Hi there,
I went to an NVIDIA workshop and wanted to run the exact same example on my computer at home. For some reason, I am running into a RuntimeError.
(code from NVIDIA workshop)
    EPS = 0.00001

    class DiceLoss(Module):
        def forward(self, input, target):
            num = (input * target).sum(dim=4, keepdim=True).sum(dim=3, keepdim=True).sum(dim=2, keepdim=True)
            den1 = input.pow(2).sum(dim=4, keepdim=True).sum(dim=3, keepdim=True).sum(dim=2, keepdim=True)
            den2 = target.pow(2).sum(dim=4, keepdim=True).sum(dim=3, keepdim=True).sum(dim=2, keepdim=True)

            dice = (2.0 * num / (den1 + den2 + EPS))
            return (1.0 - dice).mean()


image.png1726×726 113 KB

The error only appears on running backward.
Device info:
2 x Titan RTX  with compiled CUDA 10.0
OS: RHEL
Installation of pytorch was done with the following
pip3 install https://download.pytorch.org/whl/cu100/torch-1.0.1.post2-cp36-cp36m-linux_x86_64.whl
pip3 install torchvision

I am thankful for any help.
To the best of my knowledge, tensors were moved to the GPU via .cuda()