C4_W1_Q5: Test Inconsistency

There is a problem in Question 5 in week 1. This is returning a different logit value everytime I ran it, where could the issue be?

Getting even more random cases during the grading…

Hi @ftopal

One common mistake is hard coding 0.0 value instead of using the temperature variable inside your implementation. Aren’t you by chance doing that?



In the function I’m passing temperature as expected. That’s why I’m confused and Everytime I run the test I get a different output or error. I can share the full code via PM if possible. Otherwise not sure how to debug this atm.

You can send me a PM @ftopal and I will take a look.

Don’t use the following line:
state = [tf.random.uniform((1, UNITS)), tf.random.uniform((1, UNITS))]
That is the reason why you generate random results.
You should use tf.zeros instead.
I encountered this issue and spent one hour to realize what was going on.