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

Method _before_train

tensorpack/callbacks/base.py:72–81  ·  view source on GitHub ↗

Called right before the first iteration. The main difference to `setup_graph` is that at this point the graph is finalized and a default session is initialized. Override this method to, e.g. run some operations under the session. This is similar to ``tf.train.Sessio

(self)

Source from the content-addressed store, hash-verified

70 self._before_train()
71
72 def _before_train(self):
73 """
74 Called right before the first iteration. The main difference to
75 `setup_graph` is that at this point the graph is finalized and a default session is initialized.
76 Override this method to, e.g. run some operations under the session.
77
78 This is similar to ``tf.train.SessionRunHook.after_create_session()``, but different:
79 it is called after the session is initialized by :class:`tfutils.SessionInit`.
80 """
81 pass
82
83 def before_epoch(self):
84 self._before_epoch()

Callers 1

before_trainMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected