Contents

struct

SushiAI::NN::Upsample2d

Repeats every pixel of an NHWC image over a scale-by-scale block.

Declared in
include/SushiAI/nn/upsample2d.hpp

Public attributes

int64_t scale = 2

Holds the replication factor applied to both height and width; must be at least 1.

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 upsampling of x.

Parameters

x

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

Returns

The [N, H * scale, W * scale, 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 [H * scale, W * scale, C] shape.