Week 1 Programming Assignment

Hi team, I’ve successfully unit tested the assignment, got all the right outputs etc. However, when I submit to Coursera, the grader is failing me with an error about passing a numpy error to TF.

I’ve then gone back to the notebook and included a compile directive to catch any errors, but the compile was successfully on my notebook. I am a bit stuck here, can someone take a look please?

Thanks
Rajesh

Hi!

Can you give some more information about the errors?

Thanks Sam. The following is the exact error message.

Cell #UNQ_C1. Can’t compile the student’s code. Error: NotImplementedError(‘Exception encountered when calling layer “dense” (type Dense).\n\nCannot convert a symbolic Tensor (dense/Neg:0) to a numpy array. This error may indicate that you're trying to pass a Tensor to a NumPy call, which is not supported\n\nCall arguments received:\n • inputs=tf.Tensor(shape=(None, 400), dtype=float32)’)

Nevermind, I figured it out. Its a simple syntax thing, but it still bothers me it works in my Colab notebook but doesn’t work on your servers.

I passed the assignment, so moving on.

If you set up your own environment, you have to be very careful that you’re using exactly the same versions of all of the tools.

1 Like