Contents

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) const

Traces the spatial mean of x.

Parameters

x

An NHWC [N, H, W, C] value.

Returns

The [N, C] result's id.

Shape output_shape(const Shape &input) const

Computes the per-sample shape forward() produces.

Parameters

input

A per-sample [H, W, C] shape.

Returns

The per-sample [C] shape.