Contents

struct

SushiAI::NN::Unflatten

Views an [N, height * width * channels] value as [N, height, width, channels].

Declared in
include/SushiAI/nn/unflatten.hpp

Public attributes

int64_t height = 0

Holds the image height each sample is given.

int64_t width = 0

Holds the image width each sample is given.

int64_t channels = 0

Holds the channel count each sample is given.

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 a RESHAPE of x to [N, height, width, channels].

Parameters

x

An NHWC [N, height * width * channels] value.

Returns

The reshaped value's id.

Shape output_shape(const Shape &input) const

Computes the per-sample shape forward() produces.

Parameters

input

The per-sample [height * width * channels] shape.

Returns

The per-sample [height, width, channels] shape.