nip.utils.torch.UpsampleSimulateBatchDims#
- class nip.utils.torch.UpsampleSimulateBatchDims(size: int | tuple[int, ...] | None = None, scale_factor: float | tuple[float, ...] | None = None, mode: str = 'nearest', align_corners: bool | None = None, recompute_scale_factor: bool | None = None)[source]#
Upsample layer with arbitrary batch dimensions.
See
torch.nn.Upsamplefor documentation.Assumes an input of shape (… channels height width).
Methods Summary
forward(x)Apply the module to the input tensor, simulating multiple batch dimensions.
Attributes
T_destinationcall_super_initdump_patchesfeature_dimsnamesizescale_factormodealign_cornersrecompute_scale_factortrainingMethods