Returns the instance of the layer based on weights provided.
Returns the instance of the layer based on weights provided. Size of weights must be equal to weightSize
vector with layer weights
the layer model
Returns the output size given the input size (not counting the stack size).
Returns the output size given the input size (not counting the stack size). Output size is used to allocate memory for the output.
input size
output size
If true, the memory is not allocated for the output of this layer.
If true, the memory is not allocated for the output of this layer. The memory allocated to the previous layer is used to write the output of this layer. Developer can set this to true if computing delta of a previous layer does not involve its output, so the current layer can write there. This also mean that both layers have the same number of outputs.
Returns the instance of the layer with random generated weights.
Returns the instance of the layer with random generated weights.
vector for weights initialization, must be equal to weightSize
random number generator
the layer model
Number of weights that is used to allocate memory for the weights vector
Trait that holds Layer properties, that are needed to instantiate it. Implements Layer instantiation.