“Expected Long but got Int” while running PyTorch

2019-08-27 01:10发布

问题:

I am facing this error while running a pytorch script.

Can anyone help me?

Expected object of scalar type Long but got scalar type Int for argument #2 'target'