|
docc 0.8.3 (0d44999b)
C++ API Reference
|
Bilinear 2D upsampling node compatible with aten::upsample_bilinear2d.vec. More...
#include "sdfg/data_flow/library_nodes/math/tensor/tensor_node.h"#include "sdfg/serializer/json_serializer.h"Go to the source code of this file.
Classes | |
| class | sdfg::math::tensor::UpsampleBilinear2DNode |
| 2D bilinear upsampling operation More... | |
| class | sdfg::math::tensor::UpsampleBilinear2DNodeSerializer |
| Serializer for UpsampleBilinear2DNode. More... | |
Namespaces | |
| namespace | sdfg |
| namespace | sdfg::math |
| namespace | sdfg::math::tensor |
Functions | |
| data_flow::LibraryNodeCode | sdfg::math::tensor::LibraryNodeType_UpsampleBilinear2D ("ml::UpsampleBilinear2D") |
Bilinear 2D upsampling node compatible with aten::upsample_bilinear2d.vec.
This file defines the UpsampleBilinear2DNode class which implements a 2D bilinear resize following the PyTorch aten::upsample_bilinear2d.vec operator semantics:
upsample_bilinear2d.vec(Tensor input, SymInt[]? output_size, bool align_corners, float[]? scale_factors) -> Tensor
For each output index o along a spatial dimension the corresponding (fractional) source coordinate is computed exactly as PyTorch does:
The integer neighbours are i0 = floor(src) and i1 = min(i0 + 1, In - 1) with interpolation weight lambda = src - i0.