Copyright | (c) Huw Campbell 2016-2017 |
---|---|
License | BSD2 |
Stability | experimental |
Safe Haskell | None |
Language | Haskell98 |
Documentation
data Pooling :: Nat -> Nat -> Nat -> Nat -> * where Source #
A pooling layer for a neural network.
Does a max pooling, looking over a kernel similarly to the convolution network, but returning maxarg only. This layer is often used to provide minor amounts of translational invariance.
The kernel size dictates which input and output sizes will "fit". Fitting the equation: `out = (in - kernel) / stride + 1` for both dimensions.
Show (Pooling k k' s s') Source # | |
Serialize (Pooling kernelRows kernelColumns strideRows strideColumns) Source # | |
UpdateLayer (Pooling kernelRows kernelColumns strideRows strideColumns) Source # | |
(KnownNat kernelRows, KnownNat kernelColumns, KnownNat strideRows, KnownNat strideColumns, KnownNat inputRows, KnownNat inputColumns, KnownNat outputRows, KnownNat outputColumns, (~) Nat (* ((-) outputRows 1) strideRows) ((-) inputRows kernelRows), (~) Nat (* ((-) outputColumns 1) strideColumns) ((-) inputColumns kernelColumns)) => Layer (Pooling kernelRows kernelColumns strideRows strideColumns) (D2 inputRows inputColumns) (D2 outputRows outputColumns) Source # | A two dimentional image can be pooled. |
(KnownNat kernelRows, KnownNat kernelColumns, KnownNat strideRows, KnownNat strideColumns, KnownNat inputRows, KnownNat inputColumns, KnownNat outputRows, KnownNat outputColumns, KnownNat channels, KnownNat (* outputRows channels), (~) Nat (* ((-) outputRows 1) strideRows) ((-) inputRows kernelRows), (~) Nat (* ((-) outputColumns 1) strideColumns) ((-) inputColumns kernelColumns)) => Layer (Pooling kernelRows kernelColumns strideRows strideColumns) (D3 inputRows inputColumns channels) (D3 outputRows outputColumns channels) Source # | A three dimensional image can be pooled on each layer. |
type Gradient (Pooling kr kc sr sc) Source # | |
type Tape (Pooling kernelRows kernelColumns strideRows strideColumns) (D2 inputRows inputColumns) (D2 outputRows outputColumns) Source # | |
type Tape (Pooling kernelRows kernelColumns strideRows strideColumns) (D3 inputRows inputColumns channels) (D3 outputRows outputColumns channels) Source # | |