Commit 4cc1bf81 authored by thomwolf's avatar thomwolf
Browse files

typos

parent ac27548b
...@@ -157,7 +157,7 @@ class AutoModel(object): ...@@ -157,7 +157,7 @@ class AutoModel(object):
- contains `xlnet`: XLNetConfig (XLNet model) - contains `xlnet`: XLNetConfig (XLNet model)
- contains `xlm`: XLMConfig (XLM model) - contains `xlm`: XLMConfig (XLM model)
The model is set in evaluation mode by default using `model.eval()` (Dropout modules are desactivated) 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()`
Params: Params:
...@@ -179,7 +179,7 @@ class AutoModel(object): ...@@ -179,7 +179,7 @@ class AutoModel(object):
- the model was saved using the `save_pretrained(save_directory)` (loaded by suppling the save directory). - the model was saved using the `save_pretrained(save_directory)` (loaded by suppling the save directory).
**state_dict**: an optional state dictionnary for the model to use instead of a state dictionary loaded **state_dict**: an optional state dictionnary for the model to use instead of a state dictionary loaded
from saved weights file. from saved weights file.
This option can be used if you want to create a model from a pretrained configuraton but load your own weights. This option can be used if you want to create a model from a pretrained configuration but load your own weights.
In this case though, you should check if using `save_pretrained(dir)` and `from_pretrained(save_directory)` is not In this case though, you should check if using `save_pretrained(dir)` and `from_pretrained(save_directory)` is not
a simpler option. a simpler option.
**cache_dir**: (`optional`) string: **cache_dir**: (`optional`) string:
......
...@@ -324,7 +324,7 @@ class PreTrainedModel(nn.Module): ...@@ -324,7 +324,7 @@ class PreTrainedModel(nn.Module):
def from_pretrained(cls, pretrained_model_name_or_path, *model_args, **kwargs): def from_pretrained(cls, pretrained_model_name_or_path, *model_args, **kwargs):
r"""Instantiate a pretrained pytorch model from a pre-trained model configuration. r"""Instantiate a pretrained pytorch model from a pre-trained model configuration.
The model is set in evaluation mode by default using `model.eval()` (Dropout modules are desactivated) 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()`
Params: Params:
...@@ -346,7 +346,7 @@ class PreTrainedModel(nn.Module): ...@@ -346,7 +346,7 @@ class PreTrainedModel(nn.Module):
- the model was saved using the `save_pretrained(save_directory)` (loaded by suppling the save directory). - the model was saved using the `save_pretrained(save_directory)` (loaded by suppling the save directory).
**state_dict**: an optional state dictionnary for the model to use instead of a state dictionary loaded **state_dict**: an optional state dictionnary for the model to use instead of a state dictionary loaded
from saved weights file. from saved weights file.
This option can be used if you want to create a model from a pretrained configuraton but load your own weights. This option can be used if you want to create a model from a pretrained configuration but load your own weights.
In this case though, you should check if using `save_pretrained(dir)` and `from_pretrained(save_directory)` is not In this case though, you should check if using `save_pretrained(dir)` and `from_pretrained(save_directory)` is not
a simpler option. a simpler option.
**cache_dir**: (`optional`) string: **cache_dir**: (`optional`) string:
......
...@@ -119,7 +119,7 @@ class BertTokenizer(PreTrainedTokenizer): ...@@ -119,7 +119,7 @@ class BertTokenizer(PreTrainedTokenizer):
Only has an effect when do_basic_tokenize=True Only has an effect when do_basic_tokenize=True
**tokenize_chinese_chars**: (`optional`) boolean (default True) **tokenize_chinese_chars**: (`optional`) boolean (default True)
Whether to tokenize Chinese characters. Whether to tokenize Chinese characters.
This should likely be desactivated for Japanese: This should likely be deactivated for Japanese:
see: https://github.com/huggingface/pytorch-pretrained-BERT/issues/328 see: https://github.com/huggingface/pytorch-pretrained-BERT/issues/328
""" """
super(BertTokenizer, self).__init__(unk_token=unk_token, sep_token=sep_token, super(BertTokenizer, self).__init__(unk_token=unk_token, sep_token=sep_token,
...@@ -214,7 +214,7 @@ class BasicTokenizer(object): ...@@ -214,7 +214,7 @@ class BasicTokenizer(object):
List of token not to split. List of token not to split.
**tokenize_chinese_chars**: (`optional`) boolean (default True) **tokenize_chinese_chars**: (`optional`) boolean (default True)
Whether to tokenize Chinese characters. Whether to tokenize Chinese characters.
This should likely be desactivated for Japanese: This should likely be deactivated for Japanese:
see: https://github.com/huggingface/pytorch-pretrained-BERT/issues/328 see: https://github.com/huggingface/pytorch-pretrained-BERT/issues/328
""" """
if never_split is None: if never_split is None:
......
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