from tensorflow.contrib.framework.python.ops import variables as contrib_variables

  def begin(self):
    self._last_step = None
    self._global_step_tensor = contrib_variables.get_global_step()
    for m in self._monitors:
