'Evaluate bits/dim.'

def eval_epoch(self, hps):

    n_eval_dict = {'imnet': 50000, 'lsun': 300, 'celeba': 19962, 'svhn': 26032}
    if (FLAGS.eval_set_size == 0):
        num_examples_eval = n_eval_dict[FLAGS.dataset]
    else:
        num_examples_eval = FLAGS.eval_set_size
    n_epoch = (num_examples_eval / hps.batch_size)
    eval_costs = []
    bar_len = 70
    for epoch_idx in xrange(n_epoch):
        n_equal = (((epoch_idx * bar_len) * 1.0) / n_epoch)
        n_equal = numpy.ceil(n_equal)
        n_equal = int(n_equal)
        n_dash = (bar_len - n_equal)
        progress_bar = ((('[' + ('=' * n_equal)) + ('-' * n_dash)) + ']\r')
        print progress_bar,
        cost = self.bit_per_dim.eval()
        eval_costs.append(cost)
    print ''
    return float(numpy.mean(eval_costs))
