total_loss = tf.reduce_sum(tf.keras.losses.categorical_crossentropy(logits, labels, from_logits=True))

From all the details provided, this is what I understood and expected it to be the answer but I keep getting the wrong output. Whats the issue, please help!

1 Like

I think you also need to use the transpose function. Check this guide.

1 Like

Right! Also please check the definition of the `categorical_crossentropy`

function. It looks like there are some other problems with how you called it. Here’s a thread with a checklist of the common problems on this function.

1 Like

Thank You so much, it solved my problem, no errors