# Week 1 Programming Assignment

**URL:** <https://community.deeplearning.ai/t/week-1-programming-assignment/147881>\
**Category:** Advanced Learning Algorithms\
**Tags:** week-module-1\
**Created:** [June 26, 2022, 2:28pm UTC](https://community.deeplearning.ai/t/week-1-programming-assignment/147881 "2022-06-26T14:28:37Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rajesh\_Valluri](https://avatars.discourse-cdn.com/v4/letter/r/8edcca/32.png) [@Rajesh\_Valluri](https://community.deeplearning.ai/u/Rajesh_Valluri)\
**Post date:** [June 26, 2022, 2:28pm UTC](https://community.deeplearning.ai/t/week-1-programming-assignment/147881/1 "2022-06-26T14:28:37Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![SamReiswig](https://avatars.discourse-cdn.com/v4/letter/s/dbc845/32.png) [@SamReiswig](https://community.deeplearning.ai/u/SamReiswig)\
**Post date:** [June 26, 2022, 9:56pm UTC](https://community.deeplearning.ai/t/week-1-programming-assignment/147881/2 "2022-06-26T21:56:16Z")

</div>

Hi!

Can you give some more information about the errors?

---

<div class="post-metadata">

**Author:** ![Rajesh\_Valluri](https://avatars.discourse-cdn.com/v4/letter/r/8edcca/32.png) [@Rajesh\_Valluri](https://community.deeplearning.ai/u/Rajesh_Valluri)\
**Post date:** [June 28, 2022, 12:43am UTC](https://community.deeplearning.ai/t/week-1-programming-assignment/147881/3 "2022-06-28T00:43:15Z")

</div>

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)’)

---

<div class="post-metadata">

**Author:** ![Rajesh\_Valluri](https://avatars.discourse-cdn.com/v4/letter/r/8edcca/32.png) [@Rajesh\_Valluri](https://community.deeplearning.ai/u/Rajesh_Valluri)\
**Post date:** [June 28, 2022, 1:11am UTC](https://community.deeplearning.ai/t/week-1-programming-assignment/147881/4 "2022-06-28T01:11:28Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![TMosh](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/tmosh/32/9321_2.png) [@TMosh](https://community.deeplearning.ai/u/TMosh)\
**Post date:** [June 28, 2022, 1:49am UTC](https://community.deeplearning.ai/t/week-1-programming-assignment/147881/5 "2022-06-28T01:49:21Z")

</div>

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.
