MCPcopy Create free account
hub / github.com/InternScience/InternAgent / training_step

Method training_step

tasks/AutoMolecule3D/code/experiment.py:655–658  ·  view source on GitHub ↗
(self, batch, batch_idx)

Source from the content-addressed store, hash-verified

653 return self.model(data)
654
655 def training_step(self, batch, batch_idx):
656 loss_fn = mse_loss if self.hparams.loss_type == 'MSE' else l1_loss
657
658 return self.step(batch, loss_fn, "train")
659
660 def validation_step(self, batch, batch_idx, *args):
661 if len(args) == 0 or (len(args) > 0 and args[0] == 0):

Callers

nothing calls this directly

Calls 1

stepMethod · 0.95

Tested by

no test coverage detected