struct
SushiAI::NN::GlobalAvgPool
Averages an [N, H, W, C] activation over H and W, giving [N, C].
- Declared in
include/SushiAI/nn/global_avg_pool.hpp
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 spatial mean of x.
Parameters
xAn NHWC [N, H, W, C] value.
Returns
The [N, C] result's id.
Shape output_shape(const Shape &input) constComputes the per-sample shape forward() produces.
Parameters
inputA per-sample [H, W, C] shape.
Returns
The per-sample [C] shape.

