报错:object has no attribute ‘module‘

自己记录用的:

torch.save(net.module.state_dict(), os.path.join(args.save, 'model.pth'))

改为

torch.save(net.state_dict(), os.path.join(args.save, 'model.pth'))

你可能感兴趣的:(报错:object has no attribute ‘module‘)