Hi everybody, I just stumbled upon that error message and have absolutely no idea what to make of it.
I’m trying to use the generator part of GitHub - znxlwm/UGATIT-pytorch: Official PyTorch implementation of U-GAT-IT: Unsupervised Generative Attentional Networks with Adaptive Layer-Instance Normalization for Image-to-Image Translation 1 (a GAN). While it works fine on my machine, when I started it on our cluster (A100 GPU) I received this error:
  File "/workspace/src/LPR/architecture/networks.py", line 107, in forward
    out = self.UpBlock2(x)
  File "/opt/conda/lib/python3.8/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
    result = self.forward(*input, **kwargs)
  File "/opt/conda/lib/python3.8/site-packages/torch/nn/modules/container.py", line 117, in forward
    input = module(input)
  File "/opt/conda/lib/python3.8/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
    result = self.forward(*input, **kwargs)
  File "/opt/conda/lib/python3.8/site-packages/torch/nn/modules/padding.py", line 170, in forward
    return F.pad(input, self.padding, 'reflect')
  File "/opt/conda/lib/python3.8/site-packages/torch/nn/functional.py", line 3570, in _pad
    return torch._C._nn.reflection_pad2d(input, pad)
RuntimeError: input tensor must fit into 32-bit index math

I’m using PyTorch Lightning and am building upon the pytorch/pytorch:1.7.1-cuda11.0-cudnn8-devel docker.
I have no idea how to even interpret the error message, and google turns up practically nothing.
My first intuition was to turn 16-bit precision off, but the problem remains. Any pointers are welcome.