I get the below error for the code. I think I have implemented the code correctly, but I keep getting the same error.
Here is the code, which is exactly as per the guidelines in the notebook for calculating Entropy loss:
logprobs = np.multiply(np.log(A2), Y)
cost = - np.sum(logprobs)
Double-check the implementation of the entropy loss calculation and also check that A2 contains the predicted probabilities for each class and Y contains the one-hot encoded true labels. The np.log(A2) operation should only be applied to non-zero elements of A2 to avoid invalid values, too.
Hope it helps! feel free to ask if you need further assistance.