I get an error saying that my output doesn’t match the expected output for the compute_total_loss function. I am pretty sure I am doing everything correctly, I took the reduced sum and set from_logits to True. Can someone explain why I am getting the wrong output?
As tf.keras.metrics.categorical_crossentropy() accept true_y then pred_y.
make sure you pass first true_label (only have 0 or 1 value) then predicted values, other wise it will do wrong calculations.
and
both true_y and pred_y should have dimension (# of examples, # of classes )
in next cell both arguments of target ‘target(pred, tf.transpose(minibatch))’ have shape (# of classes, # of example) ,
hear # of classes is 6 and # of example is 2
and ‘target’ is ‘compute_total_loss’