PoolingLayer Class Reference

#include <pooling_layer.h>

Inheritance diagram for PoolingLayer:
Layer

Public Types

enum class  PoolingMethod { NoPooling , MaxPooling , AveragePooling }
 Enumeration of available methods for pooling data. More...
 
- Public Types inherited from Layer
enum class  Type {
  Scaling , Convolutional , Perceptron , Pooling ,
  Probabilistic , LongShortTermMemory , Recurrent , Unscaling ,
  Bounding
}
 This enumeration represents the possible types of layers. More...
 

Public Member Functions

 PoolingLayer ()
 
 PoolingLayer (const Tensor< Index, 1 > &)
 
 PoolingLayer (const Tensor< Index, 1 > &, const Tensor< Index, 1 > &)
 
virtual ~PoolingLayer ()
 Destructor. More...
 
Tensor< Index, 1 > get_outputs_dimensions () const
 Returns the layer's outputs dimensions. More...
 
Index get_inputs_number () const
 Returns the number of inputs of the layer. More...
 
Index get_inputs_channels_number () const
 Returns the number of channels of the layers' input. More...
 
Index get_inputs_rows_number () const
 Returns the number of rows of the layer's input. More...
 
Index get_inputs_columns_number () const
 Returns the number of columns of the layer's input. More...
 
Index get_neurons_number () const
 Returns the number of neurons the layer applies to an image. More...
 
Index get_outputs_rows_number () const
 Returns the number of rows of the layer's output. More...
 
Index get_outputs_columns_number () const
 Returns the number of columns of the layer's output. More...
 
Index get_padding_width () const
 Returns the padding width. More...
 
Index get_row_stride () const
 Returns the pooling filter's row stride. More...
 
Index get_column_stride () const
 Returns the pooling filter's column stride. More...
 
Index get_pool_rows_number () const
 Returns the number of rows of the pooling filter. More...
 
Index get_pool_columns_number () const
 Returns the number of columns of the pooling filter. More...
 
Index get_parameters_number () const
 Returns the number of parameters of the layer. More...
 
Tensor< type, 1 > get_parameters () const
 Returns the layer's parameters. More...
 
PoolingMethod get_pooling_method () const
 Returns the pooling method. More...
 
void set_inputs_number (const Index &)
 
void set_neurons_number (const Index &)
 
void set_input_variables_dimensions (const Tensor< Index, 1 > &)
 
void set_padding_width (const Index &)
 
void set_row_stride (const Index &)
 
void set_column_stride (const Index &)
 
void set_pool_size (const Index &, const Index &)
 
void set_pooling_method (const PoolingMethod &)
 
void set_default ()
 Sets the layer type to Layer::Pooling. More...
 
Tensor< type, 4 > calculate_outputs (const Tensor< type, 4 > &)
 
void calculate_activations (const Tensor< type, 4 > &, Tensor< type, 4 > &)
 
Tensor< type, 4 > calculate_no_pooling_outputs (const Tensor< type, 4 > &) const
 
Tensor< type, 4 > calculate_max_pooling_outputs (const Tensor< type, 4 > &) const
 
Tensor< type, 4 > calculate_average_pooling_outputs (const Tensor< type, 4 > &) const
 
Tensor< type, 2 > calculate_activations_derivatives (const Tensor< type, 2 > &) const
 
void calculate_activations_derivatives (const Tensor< type, 2 > &, Tensor< type, 2 > &) const
 
void forward_propagate (const Tensor< type, 4 > &, LayerForwardPropagation *)
 
Tensor< type, 4 > calculate_hidden_delta (Layer *, const Tensor< type, 4 > &, const Tensor< type, 4 > &, const Tensor< type, 4 > &) const
 
Tensor< type, 4 > calculate_hidden_delta_convolutional (ConvolutionalLayer *, const Tensor< type, 4 > &, const Tensor< type, 4 > &, const Tensor< type, 4 > &) const
 
Tensor< type, 4 > calculate_hidden_delta_pooling (PoolingLayer *, const Tensor< type, 4 > &, const Tensor< type, 4 > &, const Tensor< type, 4 > &) const
 
Tensor< type, 4 > calculate_hidden_delta_perceptron (PerceptronLayer *, const Tensor< type, 4 > &, const Tensor< type, 4 > &, const Tensor< type, 4 > &) const
 
Tensor< type, 4 > calculate_hidden_delta_probabilistic (ProbabilisticLayer *, const Tensor< type, 4 > &, const Tensor< type, 4 > &, const Tensor< type, 4 > &) const
 
Tensor< type, 1 > calculate_error_gradient (const Tensor< type, 2 > &, const LayerForwardPropagation &, const Tensor< type, 2 > &)
 
- Public Member Functions inherited from Layer
string get_name () const
 
virtual void set_parameters_constant (const type &)
 
virtual void set_parameters_random ()
 
virtual void set_parameters (const Tensor< type, 1 > &, const Index &)
 
void set_threads_number (const int &)
 
virtual void insert_gradient (LayerBackPropagation *, const Index &, Tensor< type, 1 > &) const
 
virtual Tensor< type, 2 > calculate_outputs (const Tensor< type, 2 > &)
 
virtual Tensor< type, 2 > calculate_outputs_from4D (const Tensor< type, 4 > &)
 
virtual Tensor< type, 4 > calculate_outputs_4D (const Tensor< type, 4 > &)
 
virtual void forward_propagate (const Tensor< type, 2 > &, LayerForwardPropagation *)
 
virtual void forward_propagate (const Tensor< type, 4 > &, Tensor< type, 1 >, LayerForwardPropagation *)
 
virtual void forward_propagate (const Tensor< type, 2 > &, Tensor< type, 1 >, LayerForwardPropagation *)
 
virtual void calculate_hidden_delta (LayerForwardPropagation *, LayerBackPropagation *, LayerBackPropagation *) const
 
virtual void calculate_hidden_delta_lm (LayerForwardPropagation *, LayerBackPropagationLM *, LayerBackPropagationLM *) const
 
virtual void calculate_error_gradient (const Tensor< type, 2 > &, LayerForwardPropagation *, LayerBackPropagation *) const
 
virtual void calculate_error_gradient (const Tensor< type, 4 > &, LayerForwardPropagation *, LayerBackPropagation *) const
 
virtual void calculate_squared_errors_Jacobian_lm (const Tensor< type, 2 > &, LayerForwardPropagation *, LayerBackPropagationLM *)
 
virtual void insert_squared_errors_Jacobian_lm (LayerBackPropagationLM *, const Index &, Tensor< type, 2 > &) const
 
virtual Index get_synaptic_weights_number () const
 Returns the number of layer's synaptic weights. More...
 
Type get_type () const
 
string get_type_string () const
 Takes the type of layer used by the model. More...
 
virtual void from_XML (const tinyxml2::XMLDocument &)
 
virtual void write_XML (tinyxml2::XMLPrinter &) const
 
virtual string write_expression (const Tensor< string, 1 > &, const Tensor< string, 1 > &) const
 
virtual string write_expression_c () const
 
virtual string write_expression_python () const
 

Protected Attributes

Tensor< Index, 1 > input_variables_dimensions
 
Index pool_rows_number = 2
 
Index pool_columns_number = 2
 
Index padding_width = 0
 
Index row_stride = 1
 
Index column_stride = 1
 
PoolingMethod pooling_method = PoolingMethod::AveragePooling
 
- Protected Attributes inherited from Layer
NonBlockingThreadPool * non_blocking_thread_pool = nullptr
 
ThreadPoolDevice * thread_pool_device = nullptr
 
string layer_name = "layer"
 Layer name. More...
 
Type layer_type = Type::Perceptron
 Layer type. More...
 
const Eigen::array< IndexPair< Index >, 1 > A_BT = {IndexPair<Index>(1, 1)}
 
const Eigen::array< IndexPair< Index >, 1 > AT_B = {IndexPair<Index>(0, 0)}
 
const Eigen::array< IndexPair< Index >, 1 > A_B = {IndexPair<Index>(1, 0)}
 

Additional Inherited Members

- Protected Member Functions inherited from Layer
void hard_sigmoid (const Tensor< type, 1 > &, Tensor< type, 1 > &) const
 
void hyperbolic_tangent (const Tensor< type, 1 > &, Tensor< type, 1 > &) const
 
void logistic (const Tensor< type, 1 > &, Tensor< type, 1 > &) const
 
void linear (const Tensor< type, 1 > &, Tensor< type, 1 > &) const
 
void threshold (const Tensor< type, 1 > &, Tensor< type, 1 > &) const
 
void symmetric_threshold (const Tensor< type, 1 > &, Tensor< type, 1 > &) const
 
void rectified_linear (const Tensor< type, 1 > &, Tensor< type, 1 > &) const
 
void scaled_exponential_linear (const Tensor< type, 1 > &, Tensor< type, 1 > &) const
 
void soft_plus (const Tensor< type, 1 > &, Tensor< type, 1 > &) const
 
void soft_sign (const Tensor< type, 1 > &, Tensor< type, 1 > &) const
 
void exponential_linear (const Tensor< type, 1 > &, Tensor< type, 1 > &) const
 
void softmax (const Tensor< type, 1 > &, Tensor< type, 1 > &) const
 
void binary (const Tensor< type, 1 > &, Tensor< type, 1 > &) const
 
void competitive (const Tensor< type, 1 > &, Tensor< type, 1 > &) const
 
void hard_sigmoid_derivatives (const Tensor< type, 1 > &, Tensor< type, 1 > &, Tensor< type, 1 > &) const
 
void hyperbolic_tangent_derivatives (const Tensor< type, 1 > &, Tensor< type, 1 > &, Tensor< type, 1 > &) const
 
void linear_derivatives (const Tensor< type, 1 > &, Tensor< type, 1 > &, Tensor< type, 1 > &) const
 
void logistic_derivatives (const Tensor< type, 1 > &, Tensor< type, 1 > &, Tensor< type, 1 > &) const
 
void threshold_derivatives (const Tensor< type, 1 > &, Tensor< type, 1 > &, Tensor< type, 1 > &) const
 
void symmetric_threshold_derivatives (const Tensor< type, 1 > &, Tensor< type, 1 > &, Tensor< type, 1 > &) const
 
void rectified_linear_derivatives (const Tensor< type, 1 > &, Tensor< type, 1 > &, Tensor< type, 1 > &) const
 
void scaled_exponential_linear_derivatives (const Tensor< type, 1 > &, Tensor< type, 1 > &, Tensor< type, 1 > &) const
 
void soft_plus_derivatives (const Tensor< type, 1 > &, Tensor< type, 1 > &, Tensor< type, 1 > &) const
 
void soft_sign_derivatives (const Tensor< type, 1 > &, Tensor< type, 1 > &, Tensor< type, 1 > &) const
 
void exponential_linear_derivatives (const Tensor< type, 1 > &, Tensor< type, 1 > &, Tensor< type, 1 > &) const
 
void hard_sigmoid (const Tensor< type, 2 > &, Tensor< type, 2 > &) const
 
void hyperbolic_tangent (const Tensor< type, 2 > &, Tensor< type, 2 > &) const
 
void logistic (const Tensor< type, 2 > &, Tensor< type, 2 > &) const
 
void linear (const Tensor< type, 2 > &, Tensor< type, 2 > &) const
 
void threshold (const Tensor< type, 2 > &, Tensor< type, 2 > &) const
 
void symmetric_threshold (const Tensor< type, 2 > &, Tensor< type, 2 > &) const
 
void rectified_linear (const Tensor< type, 2 > &, Tensor< type, 2 > &) const
 
void scaled_exponential_linear (const Tensor< type, 2 > &, Tensor< type, 2 > &) const
 
void soft_plus (const Tensor< type, 2 > &, Tensor< type, 2 > &) const
 
void soft_sign (const Tensor< type, 2 > &, Tensor< type, 2 > &) const
 
void exponential_linear (const Tensor< type, 2 > &, Tensor< type, 2 > &) const
 
void softmax (const Tensor< type, 2 > &, Tensor< type, 2 > &) const
 
void binary (const Tensor< type, 2 > &, Tensor< type, 2 > &) const
 
void competitive (const Tensor< type, 2 > &, Tensor< type, 2 > &) const
 
void hard_sigmoid_derivatives (const Tensor< type, 2 > &, Tensor< type, 2 > &, Tensor< type, 2 > &) const
 
void hyperbolic_tangent_derivatives (const Tensor< type, 2 > &, Tensor< type, 2 > &, Tensor< type, 2 > &) const
 
void linear_derivatives (const Tensor< type, 2 > &, Tensor< type, 2 > &, Tensor< type, 2 > &) const
 
void logistic_derivatives (const Tensor< type, 2 > &, Tensor< type, 2 > &, Tensor< type, 2 > &) const
 
void threshold_derivatives (const Tensor< type, 2 > &, Tensor< type, 2 > &, Tensor< type, 2 > &) const
 
void symmetric_threshold_derivatives (const Tensor< type, 2 > &, Tensor< type, 2 > &, Tensor< type, 2 > &) const
 
void rectified_linear_derivatives (const Tensor< type, 2 > &, Tensor< type, 2 > &, Tensor< type, 2 > &) const
 
void scaled_exponential_linear_derivatives (const Tensor< type, 2 > &, Tensor< type, 2 > &, Tensor< type, 2 > &) const
 
void soft_plus_derivatives (const Tensor< type, 2 > &, Tensor< type, 2 > &, Tensor< type, 2 > &) const
 
void soft_sign_derivatives (const Tensor< type, 2 > &, Tensor< type, 2 > &, Tensor< type, 2 > &) const
 
void exponential_linear_derivatives (const Tensor< type, 2 > &, Tensor< type, 2 > &, Tensor< type, 2 > &) const
 
void logistic_derivatives (const Tensor< type, 2 > &, Tensor< type, 2 > &, Tensor< type, 3 > &) const
 
void softmax_derivatives (const Tensor< type, 2 > &, Tensor< type, 2 > &, Tensor< type, 3 > &) const
 
void linear (const Tensor< type, 4 > &, Tensor< type, 4 > &) const
 
void logistic (const Tensor< type, 4 > &, Tensor< type, 4 > &) const
 
void hyperbolic_tangent (const Tensor< type, 4 > &, Tensor< type, 4 > &) const
 
void threshold (const Tensor< type, 4 > &, Tensor< type, 4 > &) const
 
void symmetric_threshold (const Tensor< type, 4 > &, Tensor< type, 4 > &) const
 
void rectified_linear (const Tensor< type, 4 > &, Tensor< type, 4 > &) const
 
void scaled_exponential_linear (const Tensor< type, 4 > &, Tensor< type, 4 > &) const
 
void soft_plus (const Tensor< type, 4 > &, Tensor< type, 4 > &) const
 
void soft_sign (const Tensor< type, 4 > &, Tensor< type, 4 > &) const
 
void hard_sigmoid (const Tensor< type, 4 > &, Tensor< type, 4 > &) const
 
void exponential_linear (const Tensor< type, 4 > &, Tensor< type, 4 > &) const
 
void linear_derivatives (const Tensor< type, 4 > &, Tensor< type, 4 > &, Tensor< type, 4 > &) const
 
void logistic_derivatives (const Tensor< type, 4 > &, Tensor< type, 4 > &, Tensor< type, 4 > &) const
 
void hyperbolic_tangent_derivatives (const Tensor< type, 4 > &, Tensor< type, 4 > &, Tensor< type, 4 > &) const
 
void threshold_derivatives (const Tensor< type, 4 > &, Tensor< type, 4 > &, Tensor< type, 4 > &) const
 
void symmetric_threshold_derivatives (const Tensor< type, 4 > &, Tensor< type, 4 > &, Tensor< type, 4 > &) const
 
void rectified_linear_derivatives (const Tensor< type, 4 > &, Tensor< type, 4 > &, Tensor< type, 4 > &) const
 
void scaled_exponential_linear_derivatives (const Tensor< type, 4 > &, Tensor< type, 4 > &, Tensor< type, 4 > &) const
 
void soft_plus_derivatives (const Tensor< type, 4 > &, Tensor< type, 4 > &, Tensor< type, 4 > &) const
 
void soft_sign_derivatives (const Tensor< type, 4 > &, Tensor< type, 4 > &, Tensor< type, 4 > &) const
 
void hard_sigmoid_derivatives (const Tensor< type, 4 > &, Tensor< type, 4 > &, Tensor< type, 4 > &) const
 
void exponential_linear_derivatives (const Tensor< type, 4 > &, Tensor< type, 4 > &, Tensor< type, 4 > &) const
 

Detailed Description

This class is used to store information about the Pooling Layer in Convolutional Neural Network(CNN). Pooling: is the procross_entropy_errors of merging, ie, reducing the size of the data and remove some noise by different processes.

Definition at line 38 of file pooling_layer.h.

Member Enumeration Documentation

◆ PoolingMethod

enum class PoolingMethod
strong

Enumeration of available methods for pooling data.

Definition at line 45 of file pooling_layer.h.

Constructor & Destructor Documentation

◆ PoolingLayer() [1/3]

PoolingLayer ( )
explicit

Default constructor. It creates an empty PoolingLayer object.

Definition at line 17 of file pooling_layer.cpp.

◆ PoolingLayer() [2/3]

PoolingLayer ( const Tensor< Index, 1 > &  new_input_variables_dimensions)
explicit

Input size setter constructor. After setting new dimensions for the input, it creates an empty PoolingLayer object.

Parameters
new_input_variables_dimensionsA vector containing the new number of channels, rows and columns for the input.

Definition at line 26 of file pooling_layer.cpp.

◆ PoolingLayer() [3/3]

PoolingLayer ( const Tensor< Index, 1 > &  new_input_variables_dimensions,
const Tensor< Index, 1 > &  pool_dimensions 
)
explicit

Input size setter constructor. After setting new dimensions for the input, it creates an empty PoolingLayer object.

Parameters
new_input_variables_dimensionsA vector containing the desired number of rows and columns for the input.
pool_dimensionsA vector containing the desired number of rows and columns for the pool.

Definition at line 37 of file pooling_layer.cpp.

◆ ~PoolingLayer()

~PoolingLayer ( )
virtual

Destructor.

Definition at line 49 of file pooling_layer.cpp.

Member Function Documentation

◆ calculate_activations()

void calculate_activations ( const Tensor< type, 4 > &  ,
Tensor< type, 4 > &   
)
inline

Definition at line 117 of file pooling_layer.h.

◆ calculate_activations_derivatives()

void calculate_activations_derivatives ( const Tensor< type, 2 > &  ,
Tensor< type, 2 > &   
) const
inline

Definition at line 129 of file pooling_layer.h.

◆ calculate_average_pooling_outputs()

Tensor< type, 4 > calculate_average_pooling_outputs ( const Tensor< type, 4 > &  inputs) const

Returns the result of applying average pooling to a batch of images.

Parameters
inputsThe batch of images.

Definition at line 95 of file pooling_layer.cpp.

◆ calculate_error_gradient()

Tensor< type, 1 > calculate_error_gradient ( const Tensor< type, 2 > &  ,
const LayerForwardPropagation ,
const Tensor< type, 2 > &   
)

Definition at line 577 of file pooling_layer.cpp.

◆ calculate_hidden_delta()

Tensor< type, 4 > calculate_hidden_delta ( Layer next_layer_pointer,
const Tensor< type, 4 > &  activations,
const Tensor< type, 4 > &  activations_derivatives,
const Tensor< type, 4 > &  next_layer_delta 
) const

Definition at line 206 of file pooling_layer.cpp.

◆ calculate_hidden_delta_convolutional()

Tensor< type, 4 > calculate_hidden_delta_convolutional ( ConvolutionalLayer next_layer_pointer,
const Tensor< type, 4 > &  ,
const Tensor< type, 4 > &  ,
const Tensor< type, 4 > &  next_layer_delta 
) const

Definition at line 247 of file pooling_layer.cpp.

◆ calculate_hidden_delta_perceptron()

Tensor< type, 4 > calculate_hidden_delta_perceptron ( PerceptronLayer next_layer_pointer,
const Tensor< type, 4 > &  ,
const Tensor< type, 4 > &  ,
const Tensor< type, 4 > &  next_layer_delta 
) const

Definition at line 475 of file pooling_layer.cpp.

◆ calculate_hidden_delta_pooling()

Tensor< type, 4 > calculate_hidden_delta_pooling ( PoolingLayer next_layer_pointer,
const Tensor< type, 4 > &  activations,
const Tensor< type, 4 > &  ,
const Tensor< type, 4 > &  next_layer_delta 
) const

Definition at line 315 of file pooling_layer.cpp.

◆ calculate_hidden_delta_probabilistic()

Tensor< type, 4 > calculate_hidden_delta_probabilistic ( ProbabilisticLayer next_layer_pointer,
const Tensor< type, 4 > &  ,
const Tensor< type, 4 > &  ,
const Tensor< type, 4 > &  next_layer_delta 
) const

Definition at line 526 of file pooling_layer.cpp.

◆ calculate_max_pooling_outputs()

Tensor< type, 4 > calculate_max_pooling_outputs ( const Tensor< type, 4 > &  inputs) const

Returns the result of applying max pooling to a batch of images.

Parameters
inputsThe batch of images.

Definition at line 155 of file pooling_layer.cpp.

◆ calculate_no_pooling_outputs()

Tensor< type, 4 > calculate_no_pooling_outputs ( const Tensor< type, 4 > &  inputs) const

Returns the result of applying no pooling to a batch of images.

Parameters
inputsThe batch of images.

Definition at line 146 of file pooling_layer.cpp.

◆ calculate_outputs()

Tensor< type, 4 > calculate_outputs ( const Tensor< type, 4 > &  inputs)

Returns the output of the pooling layer applied to a batch of images.

Parameters
inputsThe batch of images.

Definition at line 57 of file pooling_layer.cpp.

◆ forward_propagate()

void forward_propagate ( const Tensor< type, 4 > &  ,
LayerForwardPropagation  
)
inlinevirtual

Reimplemented from Layer.

Definition at line 136 of file pooling_layer.h.

◆ get_column_stride()

Index get_column_stride ( ) const

Returns the pooling filter's column stride.

Definition at line 683 of file pooling_layer.cpp.

◆ get_inputs_channels_number()

Index get_inputs_channels_number ( ) const

Returns the number of channels of the layers' input.

Definition at line 617 of file pooling_layer.cpp.

◆ get_inputs_columns_number()

Index get_inputs_columns_number ( ) const

Returns the number of columns of the layer's input.

Definition at line 637 of file pooling_layer.cpp.

◆ get_inputs_number()

Index get_inputs_number ( ) const
virtual

Returns the number of inputs of the layer.

Reimplemented from Layer.

Definition at line 609 of file pooling_layer.cpp.

◆ get_inputs_rows_number()

Index get_inputs_rows_number ( ) const

Returns the number of rows of the layer's input.

Definition at line 627 of file pooling_layer.cpp.

◆ get_neurons_number()

Index get_neurons_number ( ) const
virtual

Returns the number of neurons the layer applies to an image.

Reimplemented from Layer.

Definition at line 587 of file pooling_layer.cpp.

◆ get_outputs_columns_number()

Index get_outputs_columns_number ( ) const

Returns the number of columns of the layer's output.

Definition at line 657 of file pooling_layer.cpp.

◆ get_outputs_dimensions()

Tensor< Index, 1 > get_outputs_dimensions ( ) const

Returns the layer's outputs dimensions.

Definition at line 595 of file pooling_layer.cpp.

◆ get_outputs_rows_number()

Index get_outputs_rows_number ( ) const

Returns the number of rows of the layer's output.

Definition at line 647 of file pooling_layer.cpp.

◆ get_padding_width()

Index get_padding_width ( ) const

Returns the padding width.

Definition at line 667 of file pooling_layer.cpp.

◆ get_parameters()

Tensor< type, 1 > get_parameters ( ) const
virtual

Returns the layer's parameters.

Reimplemented from Layer.

Definition at line 715 of file pooling_layer.cpp.

◆ get_parameters_number()

Index get_parameters_number ( ) const
virtual

Returns the number of parameters of the layer.

Reimplemented from Layer.

Definition at line 707 of file pooling_layer.cpp.

◆ get_pool_columns_number()

Index get_pool_columns_number ( ) const

Returns the number of columns of the pooling filter.

Definition at line 699 of file pooling_layer.cpp.

◆ get_pool_rows_number()

Index get_pool_rows_number ( ) const

Returns the number of rows of the pooling filter.

Definition at line 691 of file pooling_layer.cpp.

◆ get_pooling_method()

PoolingLayer::PoolingMethod get_pooling_method ( ) const

Returns the pooling method.

Definition at line 723 of file pooling_layer.cpp.

◆ get_row_stride()

Index get_row_stride ( ) const

Returns the pooling filter's row stride.

Definition at line 675 of file pooling_layer.cpp.

◆ set_column_stride()

void set_column_stride ( const Index &  new_column_stride)

Sets the pooling filter's column stride.

Parameters
new_column_strideThe desired column stride.

Definition at line 759 of file pooling_layer.cpp.

◆ set_default()

void set_default ( )

Sets the layer type to Layer::Pooling.

Definition at line 789 of file pooling_layer.cpp.

◆ set_input_variables_dimensions()

void set_input_variables_dimensions ( const Tensor< Index, 1 > &  new_input_variables_dimensions)

Sets the number of rows of the layer's input.

Parameters
new_input_rows_numberThe desired rows number.

Definition at line 732 of file pooling_layer.cpp.

◆ set_inputs_number()

void set_inputs_number ( const Index &  )
inlinevirtual

Reimplemented from Layer.

Definition at line 96 of file pooling_layer.h.

◆ set_neurons_number()

void set_neurons_number ( const Index &  )
inlinevirtual

Reimplemented from Layer.

Definition at line 97 of file pooling_layer.h.

◆ set_padding_width()

void set_padding_width ( const Index &  new_padding_width)

Sets the padding width.

Parameters
new_padding_widthThe desired width.

Definition at line 741 of file pooling_layer.cpp.

◆ set_pool_size()

void set_pool_size ( const Index &  new_pool_rows_number,
const Index &  new_pool_columns_number 
)

Sets the pooling filter's dimensions.

Parameters
new_pool_rows_numberThe desired number of rows.
new_pool_columns_numberThe desired number of columns.

Definition at line 769 of file pooling_layer.cpp.

◆ set_pooling_method()

void set_pooling_method ( const PoolingMethod new_pooling_method)

Sets the layer's pooling method.

Parameters
new_pooling_methodThe desired method.

Definition at line 781 of file pooling_layer.cpp.

◆ set_row_stride()

void set_row_stride ( const Index &  new_row_stride)

Sets the pooling filter's row stride.

Parameters
new_row_strideThe desired row stride.

Definition at line 750 of file pooling_layer.cpp.

Member Data Documentation

◆ column_stride

Index column_stride = 1
protected

Definition at line 165 of file pooling_layer.h.

◆ input_variables_dimensions

Tensor<Index, 1> input_variables_dimensions
protected

Definition at line 155 of file pooling_layer.h.

◆ padding_width

Index padding_width = 0
protected

Definition at line 161 of file pooling_layer.h.

◆ pool_columns_number

Index pool_columns_number = 2
protected

Definition at line 159 of file pooling_layer.h.

◆ pool_rows_number

Index pool_rows_number = 2
protected

Definition at line 157 of file pooling_layer.h.

◆ pooling_method

PoolingMethod pooling_method = PoolingMethod::AveragePooling
protected

Definition at line 167 of file pooling_layer.h.

◆ row_stride

Index row_stride = 1
protected

Definition at line 163 of file pooling_layer.h.


The documentation for this class was generated from the following files: