I get the error RuntimeError: Expected output.numel() <= std::numeric_limits<int32_t>::max() to be true, but got false
when I try to upsample a 3D input. Code to reproduce the error
x = torch.randn(1, 256, 16, 512, 512).to("cuda")
out = F.interpolate(x, scale_factor=(2, 1, 1))
It seems the reason is that the output shape would be too large. But won’t have this error with 2D input. Example, the below code would be fine. Is this something expected?
x = torch.randn(1, 256, 512*16, 512).to("cuda")
out = F.interpolate(x, scale_factor=(1, 2))