torch.nn.functional.upsample_nearest¶
- torch.nn.functional.upsample_nearest(input, size=None, scale_factor=None)[來源][來源]¶
使用最近鄰的像素值對輸入進行升採樣。
警告
此函數已被棄用,建議使用
torch.nn.functional.interpolate()
。這等效於nn.functional.interpolate(..., mode='nearest')
。目前支援空間和體積升採樣(即預期的輸入是 4 或 5 維)。
- 參數
注意
當在 CUDA 設備上給定 tensors 時,此操作可能會產生非確定性的梯度。 有關更多訊息,請參閱再現性。