mirror of
https://github.com/HuwCampbell/grenade.git
synced 2024-11-22 06:55:13 +03:00
Simpler type
This commit is contained in:
parent
cd4598bee8
commit
b01ef9f74e
@ -119,15 +119,7 @@ randomConvolution = do
|
||||
mm = konst 0
|
||||
return $ Convolution wN mm
|
||||
|
||||
instance ( Monad m
|
||||
, KnownNat kernelRows
|
||||
, KnownNat kernelCols
|
||||
, KnownNat channels
|
||||
, KnownNat filters
|
||||
, KnownNat strideRows
|
||||
, KnownNat strideCols
|
||||
, kernelFlattened ~ (kernelRows * kernelColumns * channels)
|
||||
) => UpdateLayer m (Convolution channels filters kernelRows kernelCols strideRows strideCols) where
|
||||
instance ( Monad m ) => UpdateLayer m (Convolution channels filters kernelRows kernelCols strideRows strideCols) where
|
||||
type Gradient (Convolution channels filters kernelRows kernelCols strideRows strideCols) = (Convolution' channels filters kernelRows kernelCols strideRows strideCols)
|
||||
runUpdate LearningParameters {..} (Convolution oldKernel oldMomentum) (Convolution' kernelGradient) = do
|
||||
let newMomentum = konst learningMomentum * oldMomentum - konst learningRate * kernelGradient
|
||||
|
Loading…
Reference in New Issue
Block a user