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 GlobalAvgPooling2D Source # | |
Defined in TensorSafe.Layers.GlobalAvgPooling2D layer :: GlobalAvgPooling2D Source # compile :: GlobalAvgPooling2D -> InputShape -> CNetwork Source # | |
Layer Input 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 # | |
(KnownNat padding_rows, KnownNat padding_cols) => Layer (ZeroPadding2D padding_rows padding_cols) Source # | |
Defined in TensorSafe.Layers.ZeroPadding2D layer :: ZeroPadding2D padding_rows padding_cols Source # compile :: ZeroPadding2D padding_rows padding_cols -> InputShape -> CNetwork Source # | |
ValidNetwork ls ss => Layer (INetwork ls ss) Source # | This instance of INetwork as a Layer makes possible nesting INetworks |
(KnownNat axis, KnownNat momentum, KnownNat epsilon) => Layer (BatchNormalization axis momentum epsilon) Source # | |
Defined in TensorSafe.Layers.BatchNormalization layer :: BatchNormalization axis momentum epsilon Source # compile :: BatchNormalization axis momentum epsilon -> InputShape -> CNetwork Source # | |
Layer (Add ls6 ls7) Source # | |
(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 # | |