def begin(self):
    self._global_step_tensor = contrib_variables.get_global_step()
    if (self._global_step_tensor is None):
        raise RuntimeError('Global step should be created to use StopAtStepHook.')
def begin(self):
    self._global_step_tensor = contrib_variables.get_global_step()
    if (self._global_step_tensor is None):
        raise RuntimeError('Global step should be created to use StopAtStepHook.')