Update metrics.py
Add assert message.
diff --git a/tensorflow/python/keras/metrics.py b/tensorflow/python/keras/metrics.py
index 1fbd515..d267ab6 100644
--- a/tensorflow/python/keras/metrics.py
+++ b/tensorflow/python/keras/metrics.py
@@ -3342,7 +3342,8 @@
Returns:
Categorical accuracy values.
"""
- assert y_true.shape==y_pred.shape
+ #assert if both have same shape
+ assert y_true.shape==y_pred.shape,"Both inputs must have same shapes and must be one-hot encoded. Use tf.one_hot() to one hot encode the inputs."
return math_ops.cast(
math_ops.equal(