MCPcopy Index your code
hub / github.com/tensorpack/tensorpack / config

Method config

tensorpack/train/base.py:41–51  ·  view source on GitHub ↗

Configure the loop given the settings.

(self, steps_per_epoch, starting_epoch, max_epoch)

Source from the content-addressed store, hash-verified

39 self._local_step = -1
40
41 def config(self, steps_per_epoch, starting_epoch, max_epoch):
42 """
43 Configure the loop given the settings.
44 """
45 self.starting_epoch = int(starting_epoch)
46 self.max_epoch = int(max_epoch)
47 self.steps_per_epoch = int(steps_per_epoch)
48 # Allow empty epoch (no steps), if we want to run the callbacks only.
49 assert self.steps_per_epoch >= 0 and self.max_epoch >= 0
50
51 self._epoch_num = starting_epoch - 1
52
53 def update_global_step(self):
54 """

Callers 1

main_loopMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected