From ba9e336fa3e388581c081b529967ad46bc1c50d9 Mon Sep 17 00:00:00 2001 From: mustapha ajeghrir <66799406+Mustapha-AJEGHRIR@users.noreply.github.com> Date: Thu, 29 Sep 2022 13:27:58 +0200 Subject: [PATCH] Fix `m2m_100.mdx` doc example missing `labels` (#19149) The `labels` variable is not defined, the `model_inputs` already contain this information. --- docs/source/en/model_doc/m2m_100.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/en/model_doc/m2m_100.mdx b/docs/source/en/model_doc/m2m_100.mdx index f0a7714d24..10ac6a9df9 100644 --- a/docs/source/en/model_doc/m2m_100.mdx +++ b/docs/source/en/model_doc/m2m_100.mdx @@ -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