correct_prediction = tf.equal(tf.argmax(actual_tensor, 1), tf.argmax(
    predicted_tensor, 1))
accuracy = tf.reduce_mean(tf.cast(correct_prediction, tf.float32))
Keras Custom Objective requires Tensor Evaluation