UpSample2x¶
tiatoolbox
.models
.architecture
.utils
.UpSample2x
- class UpSample2x[source]¶
A layer to scale input by a factor of 2.
This layer uses Kronecker product underneath rather than the default pytorch interpolation.
Initialize
UpSample2x
.Methods
Logic for using layers defined in init.
Attributes
training
- forward(x)[source]¶
Logic for using layers defined in init.
- Parameters:
x (torch.Tensor) – Input images, the tensor is in the shape of NCHW.
self (UpSample2x)
- Returns:
Input images upsampled by a factor of 2 via nearest neighbour interpolation. The tensor is the shape as NCHW.
- Return type: