解决方法:
!wget http://download.pytorch.org/models/resnet18-5c106cde.pth
然后:
import torch
import torchvision.models as models
resnet18 = models.resnet18()
resnet18.load_state_dict(torch.load('resnet18-5c106cde.pth'))
print resnet18
解决方法:
!wget http://download.pytorch.org/models/resnet18-5c106cde.pth
然后:
import torch
import torchvision.models as models
resnet18 = models.resnet18()
resnet18.load_state_dict(torch.load('resnet18-5c106cde.pth'))
print resnet18