image-paragraph-captioning
image-paragraph-captioning copied to clipboard
Loading Pre-trained Models
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?