Course 1 / Week 2 - Python_Basics_with_Numpy - Submission Error: Tests could be hidden

Hello, I’ve see similar posts but no resolution to this. I’ve checked my cells several times and also run all top->bottom. On submission I’m still getting an 88%.

Wondering if possibly the one cell that demonstrates that math.exp() will not work with a vector is the issue? Though, history says is usually just me messing up :roll_eyes:

The grader error is:
[ValidateApp | INFO] Validating ‘/home/jovyan/work/submitted/courseraLearner/W2A1/Python_Basics_with_Numpy.ipynb’
[ValidateApp | INFO] Executing notebook with kernel: python3
Tests failed on 1 cell(s)! These tests could be hidden. Please check your submission.

I would recommend replacing math.exp() with np.exp() and resubmit to see if you get a higher grade.

Yes.

Hi @Dave_Cotton ,

There are a couple lines of code that can be done differently:

  1. The sigmoid() function - you can do np.exp(-x) to make the code more readable

  2. The sigmoid_derivative()function - you can just call sigmoid(x) rather than repeating the calculation

  3. The normalize_rows() function - the ord parameter is missing from the call of np.linalg.norm as the implementation instruction specified to use the norm of 2 for x. Please see below:

Compute x_norm as the norm 2 of x. Use np.linalg.norm(…, ord = 2, axis = …, keepdims = True)