Week 2, error running Adam, though all tests pass

I’m having a strange error when trying to run Adam on the moon data set. I’m able to run 6.1 (mini-batch gradient descent) and 6.2 (w/momentum) just fine, but when I try to run 6.3, I get NaN costs at every time step, leading to the learning rate plot being empty and the decision boundary plot being a solid color.

I’ve already submitted my assignment and got 100/100, and all tests passed. I tried restarting the kernel and rerunning all cells, and I get the same issue. It’s not essential that I figure this out, but I do want to visualize the results with Adam. Any idea what could be causing this?

Hi, @agentzel.

There could be an issue with the grader. Check out the message I sent you.

Yeah, I got your message and found my error, and now I’m no longer getting an error when running Adam! It’s strange that it still passed all the tests even with a mistake like that, but I’m glad I got it resolved. Thanks!

1 Like