Repository: pytorch
Issue: Interpolate in the “bicubic” mode with the same shape outputs zeros from second sample onwards
Labels: high priority,triaged

## 🐛 Bug
When using torch.nn.functional.interpolate with "bicubic" mode and target resolution similar to the input 4D tensor, the output tensor has zeros everywhere starting from the second sample.

## To Reproduce
```
>>> import torch
>>> tmp = torch.arange(2*3*3*4).reshape(2,3,3,4).float()
>>> tmp
tensor([[[[ 0.,  1.,  2.,  3.],
          [ 4.,  5.,  6.,  7.],
          [ 8.,  9., 10., 11.]],

         [[12., 13., 14., 15.],
          [16., 17., 18., 19.],
          [20., 21., 22., 23.]],

         [[24., 25., 26., 27.],
          [28., 29., 30., 31.],
          [32., 33., 34., 35.]]],

        [[[36., 37., 38., 39.],
          [40., 41., 42., 43.],
          [44., 45., 46., 47.]],

         [[48., 49., 50., 51.],
          [52., 53., 54., 55.],
          [56., 57., 58., 59.]],

         [[60., 61., 62., 63.],
          [64., 65., 66., 67.],
          [68., 69., 70., 71.]]]])

>>> torch.nn.functional.interpolate(tmp, (3, 4), mode="bicubic")
tensor([[[[ 0.,  1.,  2.,  3.],
          [ 4.,  5.,  6.,  7.],
          [ 8.,  9., 10., 11.]],

         [[12., 13., 14., 15.],
          [16., 17., 18., 19.],
          [20., 21., 22., 23.]],

         [[24., 25., 26., 27.],
          [28., 29., 30., 31.],
          [32., 33., 34., 35.]]],

        [[[ 0.,  0.,  0.,  0.],
          [ 0.,  0.,  0.,  0.],
          [ 0.,  0.,  0.,  0.]],

         [[ 0.,  0.,  0.,  0.],
          [ 0.,  0.,  0.,  0.],
          [ 0.,  0.,  0.,  0.]],

         [[ 0.,  0.,  0.,  0.],
          [ 0.,  0.,  0.,  0.],
          [ 0.,  0.,  0.,  0.]]]])
```

## Expected behavior
```
>>> torch.nn.functional.interpolate(tmp, (3, 4), mode="bicubic")`
tensor([[[[ 0.,  1.,  2.,  3.],
          [ 4.,  5.,  6.,  7.],
          [ 8.,  9., 10., 11.]],

         [[12., 13., 14., 15.],
          [16., 17., 18., 19.],
          [20., 21., 22., 23.]],

         [[24., 25., 26., 27.],
          [28., 29., 30., 31.],
          [32., 33., 34., 35.]]],

        [[[36., 37., 38., 39.],
          [40., 41., 42., 43.],
          [44., 45., 46., 47.]],

         [[48., 49., 50., 51.],
          [52., 53., 54., 55.],
          [56., 57., 58., 59.]],

         [[60., 61., 62., 63.],
          [64., 65., 66., 67.],
          [68., 69., 70., 71.]]]])
```
## Environment
PyTorch version: 1.4.0
Is debug build: No
CUDA used to build PyTorch: 10.1

OS: CentOS Linux 7 (Core)
GCC version: (GCC) 4.8.5 20150623 (Red Hat 4.8.5-36)
CMake version: version 2.8.12.2

Python version: 3.7
Is CUDA available: No
CUDA runtime version: Could not collect
GPU models and configuration:
GPU 0: Tesla V100-PCIE-16GB
GPU 1: Tesla V100-PCIE-16GB
GPU 2: Tesla V100-PCIE-16GB

Nvidia driver version: 410.48
cuDNN version: Could not collect

Versions of relevant libraries:
[pip] numpy==1.17.2
[pip] numpydoc==0.9.1
[pip] torch==1.4.0
[pip] torchvision==0.5.0
[conda] _tflow_select             2.3.0                       mkl
[conda] blas                      1.0                         mkl
[conda] mkl                       2019.4                      243
[conda] mkl-service               2.3.0            py37he904b0f_0
[conda] mkl_fft                   1.0.14           py37ha843d7b_0
[conda] mkl_random                1.1.0            py37hd6b4f25_0
[conda] pytorch                   1.4.0           py3.7_cuda10.1.243_cudnn7.6.3_0    pytorch
[conda] tensorflow                2.0.0           mkl_py37h66b46cc_0
[conda] tensorflow-base           2.0.0           mkl_py37h9204916_0
[conda] torchvision               0.5.0                py37_cu101    pytorch

cc @ezyang @gchanan @zou3519