'OSError: [Errno 101] Network is unreachable'
For security purposes, ModelArts internal training nodes are not allowed to access the Internet.
import torch import torchvision.models as models model1 = models.resnet34(pretrained=False, progress=True) checkpoint = '/xxx/resnet34-333f7ec4.pth' state_dict = torch.load(checkpoint) model1.load_state_dict(state_dict)
Before creating a training job, use the ModelArts development environment to debug the training code to maximally eliminate errors in code migration.