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:
mustapha ajeghrir 2022-09-29 13:27:58 +02:00 committed by GitHub
parent 0dc7b3a785
commit ba9e336fa3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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