'Compute accuracy of the prediction, based on the true labels.  Use the average number of equal
values.'

def accuracy(self, y_pred, y_true, x_in):

    pred_idx = tf.to_int32(tf.argmax(y_pred, 2))
    if (self.verbose > 2):
        print(('my_accuracy    pred_idx    =    %s' % pred_idx))
    accuracy = tf.reduce_mean(tf.cast(tf.equal(pred_idx, y_true), tf.float32), name='acc')
    return accuracy
