@@ -8,6 +8,8 @@
88{-# LANGUAGE MultiParamTypeClasses #-}
99{-# LANGUAGE FlexibleInstances #-}
1010{-# LANGUAGE FlexibleContexts #-}
11+{-# LANGUAGE NoStarIsType #-}
12+{-# LANGUAGE UndecidableInstances #-}
1113{-|
1214Module : Grenade.Layers.Deconvolution
1315Description : Deconvolution layer
@@ -39,6 +41,7 @@ import GHC.TypeLits hiding (natVal)
3941#else
4042import GHC.TypeLits
4143#endif
44+import Data.Kind (Type)
4245
4346import Numeric.LinearAlgebra hiding ( uniformSample, konst )
4447import qualified Numeric.LinearAlgebra as LA
@@ -60,7 +63,7 @@ data Deconvolution :: Nat -- Number of channels, for the first layer this could
6063 -> Nat -- The number of column in the kernel filter
6164 -> Nat -- The row stride of the Deconvolution filter
6265 -> Nat -- The columns stride of the Deconvolution filter
63− -> * where
66+ -> Type where
6467 Deconvolution :: ( KnownNat channels
6568 , KnownNat filters
6669 , KnownNat kernelRows
@@ -79,7 +82,7 @@ data Deconvolution' :: Nat -- Number of channels, for the first layer this could
7982 -> Nat -- The number of column in the kernel filter
8083 -> Nat -- The row stride of the Deconvolution filter
8184 -> Nat -- The columns stride of the Deconvolution filter
82− -> * where
85+ -> Type where
8386 Deconvolution' :: ( KnownNat channels
8487 , KnownNat filters
8588 , KnownNat kernelRows