Link Search Menu Expand Document

AvgPool


tensorflow C++ API

tensorflow::ops::AvgPool

Performs average pooling on the input.


Summary

Each entry inoutputis the mean of the corresponding sizeksizewindow invalue.

Arguments:

  • scope: A Scope object
  • value: 4-D with shape [batch, height, width, channels].
  • ksize: The size of the sliding window for each dimension of value.
  • strides: The stride of the sliding window for each dimension ofvalue.
  • padding: The type of padding algorithm to use.

Optional attributes (seeAttrs):

  • data_format: Specify the data format of the input and output data. With the default format “NHWC”, the data is stored in the order of: [batch, in_height, in_width, in_channels]. Alternatively, the format could be “NCHW”, the data storage order of: [batch, in_channels, in_height, in_width].

Returns:

  • Output: The average pooled output tensor.

AvgPool block

Source link : https://github.com/EXPNUNI/enuSpaceTensorflow/blob/master/enuSpaceTensorflow/tf_nn.cpp

Argument:

  • Scope scope : A Scope object (A scope is generated automatically each page. A scope is not connected.)
  • Input input: connect Input node.
  • ArraySlice< int> ksize: input ksize in values. ex)1,1,1,1
  • ArraySlice< int> strides: input ksize in values. ex)1,3,2,1
  • stringpiece padding: input padding in value. ex)SAME
  • AvgPool ::Attrs attrs: input attrs in values )data_format_ = NHWC;

Return:

  • Output output : Output object of AvgPool class object.

Result:

  • std::vector(Tensor) result_output : Returned object of executed result by calling session.

Using Method