image-paragraph-captioning icon indicating copy to clipboard operation
image-paragraph-captioning copied to clipboard

Loading Pre-trained Models

Open arjung128 opened this issue 5 years ago • 0 comments

I’m not entirely sure how train.py loads pre-trained models. PyTorch’s documentation recommends torch.load() or torch.load_state_dict() — I see torch.load_state_dict() used for the optimizer, but neither used for the main model or dp_model variables.

I also see infos = cPickle.load(f) & histories = cPickle.load(f) which seem to resemble torch.load(), but the infos and histories variables don’t seem to be used to influence the model or dp_model variables. How are the weights loaded into the model or dp_model variables?

arjung128 avatar Jun 11 '19 21:06 arjung128