pytorch-semseg
pytorch-semseg copied to clipboard
multi_scale_cross_entropy2d not referencing device correctly?
In issue #122 , the OP point out that the scale weights are not on the same device as the losses. I am guessing a fix was made such that the code now looks like
scale_weight = torch.pow(scale * torch.ones(n_inp), torch.arange(n_inp).float()).to( input.device )
But input is actually a tuple, so a quick fix could be input[0].device?