Add Axis type check
Added type check in axis to allow only integers.
@@ -1775,7 +1775,7 @@ def categorical_crossentropy(y_true,
"""
if isinstance(axis, bool):
raise ValueError(
- '`axis` must be of type `int`.')
+ f'`axis` must be of type `int`. Received: axis={axis} of type {type(axis)}')
y_pred = tf.convert_to_tensor(y_pred)
y_true = tf.cast(y_true, y_pred.dtype)
label_smoothing = tf.convert_to_tensor(label_smoothing, dtype=y_pred.dtype)
