torch.nn.functional.upsample_nearest#
- torch.nn.functional.upsample_nearest(input, size=None, scale_factor=None)[source]#
使用最近鄰畫素值上取樣輸入。
警告
此函式已棄用,建議使用
torch.nn.functional.interpolate()。這等同於nn.functional.interpolate(..., mode='nearest')。目前支援空間和體素上取樣(即,期望的輸入是 4 維或 5 維)。
- 引數
注意
此操作在使用 CUDA 裝置上的張量時可能會產生非確定性梯度。有關更多資訊,請參閱 可復現性。