Allowance of Pre-trained Model

Sorry, what’s the right way to use pre-trained model?
I’ve tried “models.resnet18(pretrained=True)” but it has failed with
urllib.error.URLError: <urlopen error [Errno 99] Cannot assign requested address>