'Determines whether the training has stopped.'

def _has_training_stopped(self, eval_result):

    if (not eval_result):
        return False
    global_step = eval_result.get(tf.GraphKeys.GLOBAL_STEP)
    return (global_step and self._train_steps and (global_step >= self._train_steps))
