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