Loading...
Searching...
No Matches
pooling_layer.h
Go to the documentation of this file.
Definition json.h:85
Definition json.h:23
Layer()=default
void set_column_stride(Index)
Shape get_input_shape() const override
Returns the input tensor shape (height, width, channels).
Definition pooling_layer.h:58
void read_JSON_body(const Json *) override
Reads the layer configuration from a JSON node.
void set_padding_width(Index)
void set_pooling_method(const string &)
Sets the pooling method by name ("MaxPooling" or "AveragePooling").
Index get_output_height() const
Returns the output feature map height.
Pooling(const Shape &={2, 2, 1}, const Shape &={ 2, 2 }, const Shape &={ 2, 2 }, const Shape &={ 0, 0 }, const string &="MaxPooling", const string &="pooling_layer")
Constructs a pooling layer with given input, pool, stride and padding shapes.
void set(const Shape &={ 0, 0, 0 }, const Shape &={ 1, 1 }, const Shape &={ 1, 1 }, const Shape &={ 0, 0 }, const string &="MaxPooling", const string &="pooling_layer")
Reconfigures the layer with new shapes and pooling method.
void set_input_shape(const Shape &) override
Updates the layer for a new input shape.
void set_pool_size(Index, Index)
Sets the pooling window height and width.
PoolingMethod get_pooling_method() const
Definition pooling_layer.h:82
void write_JSON_body(JsonWriter &) const override
Writes the layer configuration to a JSON writer.
void set_row_stride(Index)
vector< TensorSpec > get_forward_specs(Index batch_size) const override
Returns the tensor specifications used during forward propagation.
Shape get_output_shape() const override
Returns the output tensor shape after pooling.
Index get_output_width() const
Returns the output feature map width.
void set_padding_height(Index)
Definition adaptive_moment_estimation.h:14
const string & pooling_method_to_string(PoolingMethod method)
Definition pooling_layer.h:24
PoolingMethod
Pooling reduction method used by Pooling and Pooling3d layers.
Definition pooling_layer.h:19
PoolingMethod string_to_pooling_method(const string &name)
Definition pooling_layer.h:31
Fixed-capacity small-vector describing tensor dimensions (rank up to MaxRank).
Definition tensor_utilities.h:42