pyml.neural_network.layer.transformation.reshape.Flatten#
- class Flatten[source]#
Bases:
_Transformation
Flatten Layer
Methods
__init__
Perform the backward pass of the flattening operation on the gradient of the output data.
Perform the forward pass of the flattening operation on the input data.
Set adjacent layers which are needed for the model to iterate through the layers.
- backward(dvalues)[source]#
Perform the backward pass of the flattening operation on the gradient of the output data.
- Return type:
- Parameters:
dvalues (numpy.ndarray) – Derived gradient from the previous layer (reversed order).
- forward(inputs)[source]#
Perform the forward pass of the flattening operation on the input data.
- Return type:
- Parameters:
inputs (numpy.ndarray) – Input values from previous layer.
- set_adjacent_layers(previous_layer, next_layer)#
Set adjacent layers which are needed for the model to iterate through the layers.
- Parameters:
previous_layer (_Layer) – Layer that is previous to this layer.
next_layer (_Layer) – Layer that is subsequent to this layer.