interpolate
torch.nn.functional.interpolate(input, size=None, scale_factor=None, mode='nearest', align_corners=None)
根据给定的size或scale_factor参数来对输入进行下/上采样
使用的插值算法取决于参数mode的设置
支持目前的temporal(1D, 如向量数据), spatial(2D, 如jpg、png等图像数据)和volumetric(3D, 如点云数据)类型的采样数据作为输入,输入数据的格式为minibatch x channels x [optional depth] x [optional height] x width,具体为:
- 对于一个temporal输入,期待着3D张量的输入,即minibatch x channels x width
- 对于一个空间spatial输入,期待着4D张量的输入,即minibatch x channels x height x width
- 对于体积volumetric输入,则期待着5D张量的输入,即minibatch x channels x depth x height x width
可用于重置大小的mode有:最近邻、线性(3D-only),、双线性, 双三次(bicubic,4D-only)和三线性(trilinear,5D-only)插值算法和area算法
参数: