Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synapse.NN.Layers.Dense
Contents
Description
Synopsis
- data Dense a = Dense {
- denseWeights :: Mat a
- denseBias :: Vec a
- denseConstraints :: (Constraint a, Constraint a)
- denseRegularizers :: (Regularizer a, Regularizer a)
- layerDenseWith :: Symbolic a => (Initializer a, Constraint a, Regularizer a) -> (Initializer a, Constraint a, Regularizer a) -> Int -> LayerConfiguration (Dense a)
- layerDense :: Symbolic a => Int -> LayerConfiguration (Dense a)
Dense
datatype
Dense
datatype represents densely-connected neural network layer.
Dense
performs following operation: x
, where matMul
w + bw
is weights and b
is bias (if present) of a layer.
Constructors
Dense | |
Fields
|
Instances
AbstractLayer Dense Source # | |
Defined in Synapse.NN.Layers.Dense Methods inputSize :: Dense a -> Maybe Int Source # outputSize :: Dense a -> Maybe Int Source # nParameters :: Dense a -> Int Source # getParameters :: SymbolIdentifier -> Dense a -> [SymbolMat a] Source # updateParameters :: Dense a -> [Mat a] -> Dense a Source # symbolicForward :: (Symbolic a, Floating a, Ord a) => SymbolIdentifier -> SymbolMat a -> Dense a -> (SymbolMat a, SymbolMat a) Source # | |
type DType (Dense a) Source # | |
Defined in Synapse.NN.Layers.Dense |
Arguments
:: Symbolic a | |
=> (Initializer a, Constraint a, Regularizer a) | Weights initializer, constraint and regularizer. |
-> (Initializer a, Constraint a, Regularizer a) | Bias initializer, constraint and regularizer. |
-> Int | Amount of neurons. |
-> LayerConfiguration (Dense a) |
Creates configuration of dense layer.
layerDense :: Symbolic a => Int -> LayerConfiguration (Dense a) Source #
Creates default configuration of dense layer - no constraints and weight are initialized with ones, bias is initialized with zeroes.