def write_to_tensorboard(self, tb_writer, tb_tag, step):
    for key in self._num_top_i_successes:
      for i in range(self._k):
        top_i_success_rate = (self._num_top_i_successes[key][i] /
                              (self._num_accesses[key] + 1e-8))
        utils.log_scalar(
            tb_writer, "{}/{}_top_{}".format(tb_tag, key, i + 1),
            top_i_success_rate, step)