'Create accuracy and validation summaries'

def create_testing_summaries(self, show_metric=False, metric_name='Accuracy', validation_set=None):

    tr_summ_collection = (self.name + '_training_summaries')
    te_summ_collection = (self.name + '_testing_summaries')
    mn = metric_name.replace('/Mean:0/', '')
    if (show_metric and (self.metric is not None)):
        sname = (((mn + '/') + self.scope_name) + '    (raw)')
        summarize(self.metric, 'scalar', sname, tr_summ_collection)
        sname = ((mn + '/') + self.scope_name)
        self.summ_op = summarize(self.acc_averages.average(self.metric), 'scalar', sname, tr_summ_collection)
    if (validation_set is not None):
        loss_val_name = (('Loss/' + self.scope_name) + '/Validation')
        loss_val_name = check_scope_path(loss_val_name)
        self.val_summary_op = summarize(self.val_loss_T, 'scalar', loss_val_name, te_summ_collection)
        if (show_metric and (self.metric is not None)):
            acc_val_name = (((mn + '/') + self.scope_name) + '/Validation')
            acc_val_name = check_scope_path(acc_val_name)
            self.val_summary_op = summarize(self.val_acc_T, 'scalar', acc_val_name, te_summ_collection)
        if self.validation_monitors:
            for vm_op in self.validation_monitors_T:
                vm_name = (((vm_op.name + '/') + self.scope_name) + '/Validation')
                vm_name = check_scope_path(vm_name)
                self.val_summary_op = summarize(vm_op, 'scalar', vm_name, te_summ_collection)
