Add Serialize instance for Crop layer

This commit is contained in:
sholland1 2018-03-30 23:20:52 -05:00
parent b1a6e1630f
commit ad97b6ddae

View File

@ -18,6 +18,7 @@ module Grenade.Layers.Crop (
import Data.Maybe import Data.Maybe
import Data.Proxy import Data.Proxy
import Data.Serialize
import Data.Singletons.TypeLits import Data.Singletons.TypeLits
import GHC.TypeLits import GHC.TypeLits
@ -42,6 +43,10 @@ instance UpdateLayer (Crop l t r b) where
runUpdate _ x _ = x runUpdate _ x _ = x
createRandom = return Crop createRandom = return Crop
instance Serialize (Crop l t r b) where
put _ = return ()
get = return Crop
-- | A two dimentional image can be cropped. -- | A two dimentional image can be cropped.
instance ( KnownNat cropLeft instance ( KnownNat cropLeft
, KnownNat cropTop , KnownNat cropTop