mirror of
https://github.com/huggingface/transformers.git
synced 2025-08-03 03:31:05 +06:00
[Doc Fix] Fix model name path in the transformers doc for AutoClasses (#24329)
fix model name path Co-authored-by: Ritesh Ghorse <riteshghorse@Riteshs-Air.attlocal.net>
This commit is contained in:
parent
c003c8cb52
commit
20273ee214
@ -376,7 +376,7 @@ Tokenize the text and return the `input_ids` as PyTorch tensors. You'll also nee
|
||||
```py
|
||||
>>> from transformers import AutoTokenizer
|
||||
|
||||
>>> tokenizer = AutoTokenizer.from_pretrained("my_awesome_eli5_mlm_model")
|
||||
>>> tokenizer = AutoTokenizer.from_pretrained("stevhliu/my_awesome_eli5_mlm_model")
|
||||
>>> inputs = tokenizer(text, return_tensors="pt")
|
||||
>>> mask_token_index = torch.where(inputs["input_ids"] == tokenizer.mask_token_id)[1]
|
||||
```
|
||||
@ -409,7 +409,7 @@ Tokenize the text and return the `input_ids` as TensorFlow tensors. You'll also
|
||||
```py
|
||||
>>> from transformers import AutoTokenizer
|
||||
|
||||
>>> tokenizer = AutoTokenizer.from_pretrained("my_awesome_eli5_mlm_model")
|
||||
>>> tokenizer = AutoTokenizer.from_pretrained("stevhliu/my_awesome_eli5_mlm_model")
|
||||
>>> inputs = tokenizer(text, return_tensors="tf")
|
||||
>>> mask_token_index = tf.where(inputs["input_ids"] == tokenizer.mask_token_id)[0, 1]
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user