-train_from and train_from_state_dict

pytorch

(Mattia Di Gangi) #1

Hi all,

I cannot figure out why OpenNMT-py has the two options -train_from and -train_from_state_dict in the file train.py.
There is only one way to save the models, so the two options seems to be redundant.


(Guillaume Klein) #2

Hi,

It’s for backward compatibility:

However, I’m not sure older models are supported anyway so it could be cleaner to remove one of the options.


(Mattia Di Gangi) #3

Ok, thanks.

So the proper option to use is -train_from_state_dict?


(Guillaume Klein) #4

This is correct.