mirror of
https://github.com/HuwCampbell/grenade.git
synced 2024-11-21 21:59:30 +03:00
Add Serialize instance for Crop layer
This commit is contained in:
parent
b1a6e1630f
commit
ad97b6ddae
@ -18,6 +18,7 @@ module Grenade.Layers.Crop (
|
||||
|
||||
import Data.Maybe
|
||||
import Data.Proxy
|
||||
import Data.Serialize
|
||||
import Data.Singletons.TypeLits
|
||||
import GHC.TypeLits
|
||||
|
||||
@ -42,6 +43,10 @@ instance UpdateLayer (Crop l t r b) where
|
||||
runUpdate _ x _ = x
|
||||
createRandom = return Crop
|
||||
|
||||
instance Serialize (Crop l t r b) where
|
||||
put _ = return ()
|
||||
get = return Crop
|
||||
|
||||
-- | A two dimentional image can be cropped.
|
||||
instance ( KnownNat cropLeft
|
||||
, KnownNat cropTop
|
||||
|
Loading…
Reference in New Issue
Block a user