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

forward

Logic for using layers defined in init.

Attributes

training

forward(x)[source]¶

Logic for using layers defined in init.

Parameters:
Returns:

Input images upsampled by a factor of 2 via nearest neighbour interpolation. The tensor is the shape as NCHW.

Return type:

torch.Tensor