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:
committed by
GitHub
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
|
||||
|
||||
Reference in New Issue
Block a user