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

Method _setup_graph

tensorpack/callbacks/steps.py:116–123  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

114 """
115
116 def _setup_graph(self):
117 # ensure it exists
118 gs_var = get_global_step_var()
119 with tf.name_scope(None):
120 self.gs_incr_op = tf.assign_add(
121 gs_var, 1,
122 name=GLOBAL_STEP_INCR_OP_NAME).op
123 self._fetches = tf.train.SessionRunArgs(self.gs_incr_op)
124
125 def _before_train(self):
126 if self.global_step != 0:

Callers

nothing calls this directly

Calls 1

get_global_step_varFunction · 0.85

Tested by

no test coverage detected