Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module defines the Layer class from which all Layers should have instances of.
Synopsis
- type InputShape = Maybe String
- class Layer x
- compile :: Layer x => x -> InputShape -> CNetwork
- layer :: Layer x => x
Documentation
type InputShape = Maybe String Source #
Auxiliary type for Input Shape parameter
Defines that a type is a Layer Each layer can be compilated into a specific CNetwork expression which can later be used to generate code to a specific backend.
Instances
Layer Flatten Source # | |
Layer Relu Source # | |
Layer Sigmoid Source # | |
(KnownNat input, KnownNat output) => Layer (Dense input output) Source # | |
(KnownNat rate, KnownNat seed) => Layer (Dropout rate seed) Source # | |
KnownNat units => Layer (LSTM units b) Source # | |
ValidNetwork ls ss => Layer (INetwork ls ss) Source # | This instance of INetwork as a Layer makes possible nesting INetworks |
(KnownNat kernelRows, KnownNat kernelColumns, KnownNat strideRows, KnownNat strideColumns) => Layer (MaxPooling kernelRows kernelColumns strideRows strideColumns) Source # | |
Defined in TensorSafe.Layers.MaxPooling layer :: MaxPooling kernelRows kernelColumns strideRows strideColumns Source # compile :: MaxPooling kernelRows kernelColumns strideRows strideColumns -> InputShape -> CNetwork Source # | |
(KnownNat channels, KnownNat filters, KnownNat kernelRows, KnownNat kernelColumns, KnownNat strideRows, KnownNat strideColumns) => Layer (Conv2D channels filters kernelRows kernelColumns strideRows strideColumns) Source # | |