MCPcopy Create free account
hub / github.com/huggingface/transformers / validation_step

Method validation_step

examples/seq2seq/finetune.py:135–136  ·  view source on GitHub ↗
(self, batch, batch_idx)

Source from the content-addressed store, hash-verified

133 return {"loss": loss_tensors[0], "log": logs}
134
135 def validation_step(self, batch, batch_idx) -> Dict:
136 return self._generative_step(batch)
137
138 def validation_epoch_end(self, outputs, prefix="val") -> Dict:
139 self.step_count += 1

Callers 1

test_stepMethod · 0.45

Calls 1

_generative_stepMethod · 0.95

Tested by 1

test_stepMethod · 0.36