No module named 'torch.hub' and 'torch.utils.model_zoo'

The Github code I ran needs Pytorch >= 1.4.0, while Pytorch in my server is 1.3.1. Does the version of Pytorch cause this problem? How can I fix it?

torch.hub and torch.utils.model_zoo were already in 1.3.1, so could you please double check your version?

Generally, we recommend to use the latest version, as it ships with bug fixes as well as new features.

1 Like

Thanks. I updated the version to 1.4.0 and then this problem was solved.