问题:AttributeError: ‘torch.device’ object has no attribute ‘_apply’ 问题分析 :原因是没有实例化,包括损失函数的实例化以及模型的实例化 解决方法:在损失函数或模型后面加(),比如下面的例子