Course2,Week3,ex6 compute_cost,something mysterious

Hi everyone
In excercise 6
I have already did transpos & softmax
and I got a very close answer which is 0.81028694 ( Expected output is 0.810287)
and I still got AssertionError
I want to know how can I improve my code
Thanks all!


I have solved the problem by adding “from_logits”
Thanks all!

It’s great to hear that you figured this out on your own. Here’s another thread about the same question that talks about why manually adding softmax doesn’t give the same answer as using the from_logits option.