mirror of
https://github.com/huggingface/transformers.git
synced 2025-07-31 10:12:23 +06:00
Fix m2m_100.mdx
doc example missing labels
(#19149)
The `labels` variable is not defined, the `model_inputs` already contain this information.
This commit is contained in:
parent
0dc7b3a785
commit
ba9e336fa3
@ -57,7 +57,7 @@ tgt_text = "La vie est comme une boîte de chocolat."
|
||||
|
||||
model_inputs = tokenizer(src_text, text_target=tgt_text, return_tensors="pt")
|
||||
|
||||
loss = model(**model_inputs, labels=labels) # forward pass
|
||||
loss = model(**model_inputs).loss # forward pass
|
||||
```
|
||||
|
||||
- Generation
|
||||
|
Loading…
Reference in New Issue
Block a user