MCPcopy Create free account
hub / github.com/pytorch/examples / train

Method train

distributed/ddp-tutorial-series/single_gpu.py:43–47  ·  view source on GitHub ↗
(self, max_epochs: int)

Source from the content-addressed store, hash-verified

41 print(f"Epoch {epoch} | Training checkpoint saved at {PATH}")
42
43 def train(self, max_epochs: int):
44 for epoch in range(max_epochs):
45 self._run_epoch(epoch)
46 if epoch % self.save_every == 0:
47 self._save_checkpoint(epoch)
48
49
50def load_train_objs():

Callers 1

mainFunction · 0.95

Calls 2

_run_epochMethod · 0.95
_save_checkpointMethod · 0.95

Tested by

no test coverage detected