Unverified Commit ba9e336f authored by mustapha ajeghrir's avatar mustapha ajeghrir Committed by GitHub
Browse files

Fix `m2m_100.mdx` doc example missing `labels` (#19149)

The `labels` variable is not defined, the `model_inputs` already contain this information.
parent 0dc7b3a7
...@@ -57,7 +57,7 @@ tgt_text = "La vie est comme une boîte de chocolat." ...@@ -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") 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 - Generation
......
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