Last programming assignment: Deep neural network- Application

Hi,
I have tried multiple times to pass this assignment but it gives me only score 50/100 although I did run every cell and made sure that I get correct outputs. Can you please check what is wrong there?


Moreover, I wanted to ask is it possible to save/download all these assignments for future references?

Hello @Ali_Mardan_Khan

Kindly refer Downloading entire assignment to download the assignments
regards
Jenitta

1 Like

Hi Thank you so much for your reply to second part of my questions.

Please someone from admin group check my last programming assignment.

Hello @Ali_Mardan_Khan
What messages do you get from the grader? They’re available just beneath your score.

I get following error ( I have tried and trained my model twice and it works fine but still grader gives this error):
[ValidateApp | INFO] Validating ‘/home/jovyan/work/submitted/courseraLearner/W4A2/Deep Neural Network - Application.ipynb’
[ValidateApp | INFO] Executing notebook with kernel: python3
[ValidateApp | ERROR] Timeout waiting for execute reply (30s).
[ValidateApp | ERROR] Interrupting kernel
Tests failed on 1 cell(s)! These tests could be hidden. Please check your submission.

The following cell failed:

parameters, costs = two_layer_model(train_x, train_y, layers_dims = (n_x, n_h, n_y)...

print("Cost after first iteration: " + str(costs[0]))

two_layer_model_test(two_layer_model)

The error was:

---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-7-f9ec5304d38d> in <module>
----> 1 parameters, costs = two_layer_model(train_x, train_y, layers_dims = (n_x, n...
      2 
      3 print("Cost after first iteration: " + str(costs[0]))
      4 
      5 two_layer_model_test(two_layer_model)

NameError: name 'n_x' is not defined

from the error message you got name ‘n_x’ is not defined, it seems the previous cells of the notebook is not run. One more time try to run all the cells from the beginning

Hi, Ali.

Please note that no-one but you can see your notebooks. Well, the course staff can, but the mentors cannot. Are you sure that all the cells in the notebook run successfully when you run them locally? Please try these steps:

  1. Kernel → Restart and Clear Output
  2. Cell → Run All

That will take a while, since it has to run the training for both the 2 layer and 4 layer models. Then carefully scroll through the notebook and check all the output of the various cells to make sure no errors are thrown.

First you might want to use the browser “find” function to check all instances of n_x as Jenitta points out there seems to be some problem with that. If it’s a problem for the grader, I’d expect it to be a problem when you run it also. One thing to look for is some cell that was originally a “code” cell, but you accidentally changed it to a “markdown” cell (meaning documentation, so that it doesn’t get executed).