upsample_nearest¶
dragon.vm.torch.nn.functional.
upsample_nearest
(
input,
size=None,
scale_factor=None
)[source]¶Upsample input via nearest interpolating.
Examples:
x = torch.ones((1, 2, 3, 4)) y = F.upsample_nearest(x, size=6) # Shape: (1, 2, 6, 6) z = F.upsample_nearest(x, scale_factor=2) # Shape: (1, 2, 6, 8)
- Parameters:
- input (dragon.vm.torch.Tensor) – The input tensor.
- size (Union[int, Sequence[int]], optional) – The output size.
- scale_factor (Union[number, Sequence[number]], optional) – The scale factor along each input dimension.
- Returns:
dragon.vm.torch.Tensor – The output tensor.
See also