void set(const Shape &)
Reconfigures the layer with a new input shape.
Flatten(const Shape &={})
Constructs a flatten layer for the given input shape.
void set_input_shape(const Shape &new_input_shape) override
Sets the input shape; subclasses override to derive dependent dimensions.
Definition flatten_layer.h:32
Shape get_output_shape() const override
Returns the flattened 1D output shape (product of input dimensions).
Definition flatten_layer.h:26
Shape input_shape
Definition layer.h:256
Definition adaptive_moment_estimation.h:14
Flattens a multi-dimensional tensor into a 2D (batch, features) tensor.
Definition operators.h:995
Fixed-capacity small-vector describing tensor dimensions (rank up to MaxRank).
Definition tensor_utilities.h:42