Clarified PreTrainedModel.from_pretrained warning messages in documentation.

This commit is contained in:
LysandreJik 2019-08-08 19:04:34 -04:00
parent f2b300df6b
commit 3566d27919

View File

@ -365,6 +365,11 @@ class PreTrainedModel(nn.Module):
The model is set in evaluation mode by default using ``model.eval()`` (Dropout modules are deactivated)
To train the model, you should first set it back in training mode with ``model.train()``
The warning ``Weights from XXX not initialized from pretrained model`` means that the weights of XXX do not come pre-trained with the rest of the model.
It is up to you to train those weights with a downstream fine-tuning task.
The warning ``Weights from XXX not used in YYY`` means that the layer XXX is not used by YYY, therefore those weights are discarded.
Parameters:
pretrained_model_name_or_path: either: