When I return a Long gradient, Pytorch 1.5 complains with this error that it should be a floating type. https://github.com/pytorch/pytorch/blob/54c05fa34e1fbbb5096746a8ae92e27a08116de4/torch/csrc/autograd/engine.cpp#L610
However when I cast this to float gradient in Pytorch 1.2, it complains that expected Long gradient but received float.
Has behavior changed over versions?