"...git@developer.sourcefind.cn:modelzoo/donut_pytorch.git" did not exist on "4cfcf972560e1a0f26eb3e294c8fc88a0d336626"
Unverified Commit 6f041fcb authored by mchau's avatar mchau Committed by GitHub
Browse files

fix documentation for CustomTrainer (#25635)

fix doc
parent 8608bf20
......@@ -60,7 +60,7 @@ from transformers import Trainer
class CustomTrainer(Trainer):
def compute_loss(self, model, inputs, return_outputs=False):
labels = inputs.get("labels")
labels = inputs.pop("labels")
# forward pass
outputs = model(**inputs)
logits = outputs.get("logits")
......
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