'Evaluate the cost of the epoch.
Args:
data_dict: The dictionary of data (training and validation) used for
training and evaluation of the model, respectively.
Returns:
a 3 tuple of costs:
(epoch total cost, epoch reconstruction cost, epoch KL cost)'

def eval_cost_epoch(self, datasets, kind='train', ext_input_extxi=None, batch_size=None):

    ops_to_eval = [self.cost, self.recon_cost, self.kl_cost]
    collected_op_values = self.run_epoch(datasets, ops_to_eval, kind=kind, keep_prob=1.0)
    total_cost = total_recon_cost = total_kl_cost = 0.0
    epoch_size = len(collected_op_values)
    for op_values in collected_op_values:
        total_cost += op_values[0]
        total_recon_cost += op_values[1]
        total_kl_cost += op_values[2]
    epoch_total_cost = (total_cost / epoch_size)
    epoch_recon_cost = (total_recon_cost / epoch_size)
    epoch_kl_cost = (total_kl_cost / epoch_size)
    return (epoch_total_cost, epoch_recon_cost, epoch_kl_cost)
