pytorch-semseg icon indicating copy to clipboard operation
pytorch-semseg copied to clipboard

multi_scale_cross_entropy2d not referencing device correctly?

Open monghimng opened this issue 6 years ago • 0 comments

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?

monghimng avatar Feb 26 '19 18:02 monghimng