def __init__(self, every_n_steps=100, output_dir=None, summary_writer=None):
    super(StepCounter, self).__init__(every_n_steps=every_n_steps)
    self._summary_tag = 'global_step/sec'
    self._last_reported_step = None
    self._last_reported_time = None
    self._summary_writer = summary_writer
    if ((summary_writer is None) and output_dir):
        self._summary_writer = SummaryWriterCache.get(output_dir)
def __init__(self, every_n_steps=100, output_dir=None, summary_writer=None):
    super(StepCounter, self).__init__(every_n_steps=every_n_steps)
    self._summary_tag = 'global_step/sec'
    self._last_reported_step = None
    self._last_reported_time = None
    self._summary_writer = summary_writer
    if ((summary_writer is None) and output_dir):
        self._summary_writer = SummaryWriterCache.get(output_dir)