RuntimeError: expected scalar type Long but found Int这个错误首先定位是Label错误也就是Loss计算出错!每个代码的loss都不一样,找到我们代码的Loss那里,将label的属性变化一下 添加红框内容,根据实际情况进行调整即可