Commit 3566d279 authored by LysandreJik's avatar LysandreJik
Browse files

Clarified PreTrainedModel.from_pretrained warning messages in documentation.

parent f2b300df
...@@ -365,6 +365,11 @@ class PreTrainedModel(nn.Module): ...@@ -365,6 +365,11 @@ class PreTrainedModel(nn.Module):
The model is set in evaluation mode by default using ``model.eval()`` (Dropout modules are deactivated) 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()`` 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: Parameters:
pretrained_model_name_or_path: either: pretrained_model_name_or_path: either:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment