Module 'torch.utils' has no attribute 'model_zoo'

I wanted to load the caffe model for network in network from model zoo ( I tried to follow the method given in pytorch docs: state_dict = torch.utils.model_zoo.load_url(‘’) but im getting:
AttributeError: module ‘torch.utils’ has no attribute ‘model_zoo’

Am I doing something wrong?

you must’ve forgottten import torch.utils

No, I did import it. It still doesn’t work, do you suggest re-installing pytorch or something?

hmmm, what version of torch are you on?


oh i see now. you actually have to import

import torch.utils.model_zoo