运行报错:
Expected object of scalar type Float but got scalar type Long for argument #2 ‘target’
解决:将传给target的数据类型转换为float
labels = labels.float()
运行报错:
Expected object of scalar type Float but got scalar type Long for argument #2 ‘target’
解决:将传给target的数据类型转换为float
labels = labels.float()