PyTorch 30.上下采样函数--interpolate - 知乎
https://zhuanlan.zhihu.com/p/166323682PyTorch 30.上下采样函数--interpolate. torch.nn.functional.interpolate ( input, size=None, scale_factor=None, mode='nearest', align_corners=None ):. The algorithm used for interpolation is determined by mode. Currently temporal, spatial and volumetric sampling are supported, i.e. expected inputs are 3-D, 4-D or 5-D in shape.
torch.lerp — PyTorch 1.10.1 documentation
pytorch.org › docs › stabletorch.lerp. Does a linear interpolation of two tensors start (given by input) and end based on a scalar or tensor weight and returns the resulting out tensor. The shapes of start and end must be broadcastable. If weight is a tensor, then the shapes of weight, start, and end must be broadcastable. out ( Tensor, optional) – the output tensor.
torch.nn.functional.interpolate — PyTorch 1.10.1 documentation
pytorch.org › torchtorch.nn.functional.interpolate. Down/up samples the input to either the given size or the given scale_factor. The algorithm used for interpolation is determined by mode. Currently temporal, spatial and volumetric sampling are supported, i.e. expected inputs are 3-D, 4-D or 5-D in shape. The input dimensions are interpreted in the form: mini ...