Tranformer: change dropout when finetuning


I need to change the dropout when finetuning a base Transformer model. When training from a checkpoint, it uses the dropout from the checkpoint. Is there a way I can force the dropout to be changed?


I considered adding the following lines in

# Override checkpoint's droupout
model_opt.dropout = opt.dropout
model_opt.attention_dropout = opt.attention_dropout

This seems like a good idea, but I wonder if we should add as well some sort of flag e.g. --override-opts to avoid changing some opts inadvertently.


Does OpenNMT-py support fine tuning?