-
Notifications
You must be signed in to change notification settings - Fork 25.5k
Open
Labels
module: NaNs and InfsProblems related to NaN and Inf handling in floating pointProblems related to NaN and Inf handling in floating pointmodule: nnRelated to torch.nnRelated to torch.nntriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate moduleThis issue has been looked at a team member, and triaged and prioritized into an appropriate module
Description
🐛 Bug
torch.nn.functional.grid_sample
outputs NaN if grid
contains large value
To Reproduce
import torch
torch.nn.functional.grid_sample(input=torch.ones([1,1,1,5]), grid=torch.tensor([[[[ 2.9839e+38, -3.2406e+38]]]]))
Output:
tensor([[[[nan]]]])
Expected behavior
Expect a grace exception message if the parameters are invalid or unexpected
Environment
PyTorch version: 1.8.0.dev20210126+cpu
Is debug build: False
CUDA used to build PyTorch: None
ROCM used to build PyTorch: N/A
OS: Ubuntu 18.04.4 LTS (x86_64)
GCC version: Could not collect
Clang version: Could not collect
CMake version: Could not collect
Python version: 3.7 (64-bit runtime)
Is CUDA available: False
CUDA runtime version: No CUDA
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA
HIP runtime version: N/A
MIOpen runtime version: N/A
Metadata
Metadata
Assignees
Labels
module: NaNs and InfsProblems related to NaN and Inf handling in floating pointProblems related to NaN and Inf handling in floating pointmodule: nnRelated to torch.nnRelated to torch.nntriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate moduleThis issue has been looked at a team member, and triaged and prioritized into an appropriate module