struct
SushiAI::NN::AvgPool2d
Averages every window of an NHWC image, dividing by the full window area.
- Declared in
include/SushiAI/nn/avg_pool2d.hpp
Public attributes
Graph::ConvGeometry geometry {}Holds the window; its top and left pads apply to both sides of an axis.
Static public member functions
static constexpr auto fields()Lists this layer's parameters, of which there are none.
Public member functions
Graph::ValueId forward(const Graph::GraphBuilder &builder, Graph::ValueId x) constTraces the pooling node.
Parameters
xAn NHWC [N, H, W, C] value that the window fits.
Returns
The pooled [N, out_h, out_w, C] value's id.
Shape output_shape(const Shape &input) constComputes the per-sample shape forward() produces.
Parameters
inputA per-sample [H, W, C] shape that the window fits.
Returns
The per-sample [out_h, out_w, C] shape.

