Course 1, Week 4 Assignment: DNN Application - Submission does not seem to go through

I am having issues with submitting the last assignment of Course 1 Week 4: DNN Application.

I have done the home twice (second time with a fresh notebook) and all tests passed apart from an error related to the a test of the two_layer_model that was referenced in the “Confusing Output from the AutoGrader” document.

All results are exactly as the expected output. I click submit, and the results don’t get updated. This has been the case for two days now (hence my restarting afresh today).

I click submit, I get the pop up saying the submission is successful, but I check the and the assignment is not updated.

What could be the issue?

The error output related to the two_layer_mdel_test (…) is shown below:

Cost after iteration 1: 0.6926114346158594
Cost after first iteration: 0.693049735659989
Cost after iteration 1: 0.6915746967050506
Error: Datatype mismatch. in variable 0. Got type: <class 'numpy.float64'>  but expected type <class 'numpy.ndarray'>
Cost after iteration 1: 0.6915746967050506
Cost after iteration 1: 0.6915746967050506
Cost after iteration 2: 0.6524135179683452
 3  Tests passed
 1  Tests failed

After this error, all the other cells return exact results as expected.

Also, I hope there is not some issue related to when you start and finish the course, because I went through Course 1 in a few days - now stuck with submission issue for two days

Hi @jeosol
What is the output of your next cell,

1 Like

Not sure if this violates the honor code, if so I can remove them but I imagine they will help to source the issues.

I should mention that the rest of the cells results are matched exactly.

{‘W1’: array([[ 0.01624978, -0.00610924, -0.00527547, …, -0.0052654 ,
-0.0037952 , 0.00949843],
[ 0.01007839, 0.00228258, -0.00665253, …, 0.00688496,
-0.0048998 , 0.00206656],
[-0.00356398, -0.00195558, 0.00636749, …, 0.00822672,
-0.00104517, -0.00658008],
[-0.00315378, 0.01245457, -0.01304573, …, 0.00370149,
0.01033204, -0.00896029],
[ 0.00487906, 0.00350025, -0.00084782, …, -0.0055929 ,
0.00325009, 0.00231412],
[ 0.00534249, 0.02512632, -0.01044567, …, 0.02165397,
-0.00842309, 0.00359928]]), ‘b1’: array([[ 2.04122577e-05],
[ 6.42163402e-07],
[ 6.07783839e-06]]), ‘W2’: array([[-0.00996163, 0.02592067, 0.00100249, 0.02809494, -0.00100987,
0.01565666, -0.00349844]]), ‘b2’: array([[-0.00231624]])}


I have resolved the problem. It was a minor problem with my code - writing an implementation of a function instead of calling one of the functions. The grader was not happy. I was helped by one of your other mentors to resolve this issue.


1 Like

@jeosol , I am glad you have fixed the issue. Yes, when the hint says to use help functions, don’t use your own functions to avoid issues like this one. On the other side, after you have passed the tests, then you can test your own functions and compare if the results are the same and so, everybody is happy :grinning:

Thanks for the info. Specifically, I coded the cost function by hand that returns a cost (one liner) but should have used the function which returns an array. There was an incompatibility in the use of the cost result downstream since an array is expected.

Yes, the submission went through. And the score was consistent. And moving to next course.