TensorFlow Introduction

Hello, the assignment tells us to use “tf.reduce_mean(tf.keras.losses.binary_crossentropy(y_true = …, y_pred = …, from_logits=True))” to find the cost. It also uses test data where the predictions have shape (6, 120), which means that there are 6 classes. Why is the binary_crossentropy method being used when a cost is being calculated with 6 classes?

HI @dg2004,

there is an interesting discussion about this, you can find it in the middle of this thread.

Hope that helps.