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

Method run_step

tensorpack/train/base.py:167–179  ·  view source on GitHub ↗

Defines what to do in one iteration. The default is: ``self.hooked_sess.run(self.train_op)``. The behavior of each iteration can be changed by either setting ``trainer.train_op``, or overriding this method.

(self)

Source from the content-addressed store, hash-verified

165 register_callback = _register_callback
166
167 def run_step(self):
168 """
169 Defines what to do in one iteration. The default is:
170 ``self.hooked_sess.run(self.train_op)``.
171
172 The behavior of each iteration can be changed by either setting ``trainer.train_op``,
173 or overriding this method.
174 """
175 if not hasattr(self, 'train_op'):
176 raise NotImplementedError(
177 "Please either set `Trainer.train_op` or provide an implementation "
178 "of Trainer.run_step()!")
179 self.hooked_sess.run(self.train_op)
180
181 @call_only_once
182 def setup_callbacks(self, callbacks, monitors):

Callers 1

main_loopMethod · 0.95

Calls 1

runMethod · 0.45

Tested by

no test coverage detected