问题描述

RuntimeError: Input type (torch.cuda.FloatTensor) and weight type
(torch.FloatTensor) should be the same

解决方法

对net或者新添加的模块进行转换。

解决方法1
device = torch.device('cuda:0')
net= net.to(device)
解决方法2
net = net.cuda()
Logo

北京人形旗下天工造物具身智能开源社区,聚焦具身天工与慧思开物两大平台

更多推荐