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 = 2Holds 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) constTraces the upsampling of x.
Parameters
xAn NHWC [N, H, W, C] value.
Returns
The [N, H * scale, W * scale, 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 [H * scale, W * scale, C] shape.

