I have trained my model  on GPU but I was getting this error while training
AttributeError:‘collections.OrderedDict’ object has no attribute ‘to’ ,
the code comes after this
my_resnet18 =torch.load(’…/resnet18model/best_model.pth’)
my_resnet18.fc =torch.nn.Sequential(nn.Linear(512, 16),nn.Tanh())
my_resnet18 = my_resnet18.to(device)
Is there anything wrong with this?
my pytorch version is 1.0.0