Skip to content

Commit

Permalink
Fix doc bug (huggingface#8500)
Browse files Browse the repository at this point in the history
* fix doc bug

Signed-off-by: mymusise <mymusise1@gmail.com>

* fix example bug

Signed-off-by: mymusise <mymusise1@gmail.com>
  • Loading branch information
mymusise authored and fabiocapsouza committed Nov 15, 2020
1 parent 677c6d9 commit 2cd9b9a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/source/main_classes/trainer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 2cd9b9a

Please sign in to comment.