Contents

struct

SushiAI::NN::MaxPool2d

Takes the maximum of every window of an NHWC activation.

Declared in
include/SushiAI/nn/max_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) const

Traces the pooling node.

Parameters

x

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

Computes the per-sample shape forward() produces.

Parameters

input

A per-sample [H, W, C] shape that the window fits.

Returns

The per-sample [out_h, out_w, C] shape.