Unverified Commit d65e0bfe authored by Chengxi Guo's avatar Chengxi Guo Committed by GitHub
Browse files

Fix doc bug (#8500)



* fix doc bug
Signed-off-by: default avatarmymusise <mymusise1@gmail.com>

* fix example bug
Signed-off-by: default avatarmymusise <mymusise1@gmail.com>
parent 924c624a
......@@ -35,7 +35,7 @@ Here is an example of how to customize :class:`~transformers.Trainer` using a cu
class MyTrainer(Trainer):
def compute_loss(self, model, inputs):
labels = inputs.pop("labels")
outputs = models(**inputs)
outputs = model(**inputs)
logits = outputs[0]
return my_custom_loss(logits, labels)
......
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