def write_to_tensorboard(self, tb_writer, tb_tag, step):
    weighted_taus = np.array(self._weighted_taus)
    eviction_masks = np.array(self._masks)

    eviction_mean_weighted_tau = np.sum(
        weighted_taus * eviction_masks) / (np.sum(eviction_masks) + 1e-8)
    utils.log_scalar(
        tb_writer, "{}/eviction_weighted_tau".format(tb_tag),
        eviction_mean_weighted_tau, step)

    utils.log_scalar(
        tb_writer, "{}/total_weighted_tau".format(tb_tag),
        np.mean(weighted_taus), step)