88 enum Forward {Input, Output};
90 enum Backward {OutputDelta, InputDelta};
Shape get_input_shape() const override
Returns the per-sample input shape.
Definition flatten_layer.h:47
void set(const Shape &)
Re-initializes the layer.
Flatten(const Shape &input_shape={})
Constructs a Flatten layer.
void back_propagate(ForwardPropagation &, BackPropagation &, size_t) const noexcept override
Backward pass: reshapes the output gradient back to the input shape.
void set_input_shape(const Shape &new_input_shape) override
Updates the input shape; equivalent to calling set().
Definition flatten_layer.h:68
Shape get_output_shape() const override
Returns the per-sample output shape.
Definition flatten_layer.h:52
vector< Operator * > get_operators() override
Returns the single Flat operator that implements this layer.
Definition flatten_layer.h:55
Layer()=default
Default constructor; only invoked by subclasses.
Declares the Layer abstract base class and the LayerType enumeration.
Definition adaptive_moment_estimation.h:19
Definition back_propagation.h:26
Definition operators.h:680
Definition forward_propagation.h:19
Definition tensor_utilities.h:46