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

Method train

distributed/ddp-tutorial-series/multigpu.py:62–66  ·  view source on GitHub ↗
(self, max_epochs: int)

Source from the content-addressed store, hash-verified

60 print(f"Epoch {epoch} | Training checkpoint saved at {PATH}")
61
62 def train(self, max_epochs: int):
63 for epoch in range(max_epochs):
64 self._run_epoch(epoch)
65 if self.gpu_id == 0 and epoch % self.save_every == 0:
66 self._save_checkpoint(epoch)
67
68
69def load_train_objs():

Callers 1

mainFunction · 0.95

Calls 2

_run_epochMethod · 0.95
_save_checkpointMethod · 0.95

Tested by

no test coverage detected