Hello,
I have tried to submit my week 3 lab coding assignment for over a week now, but it still says that it cannot compile code from the notebook. I have restarted the kernel on multiple occasions. It says all test are passed, except for the following test:
Note:
Actual values are not checked here in the unit tests (due to random initialization).
w3_unittest.test_initialize_parameters(initialize_parameters)
As I said, it’s not my course, but I have to wonder why the function has an assert that checks if W.shape is (n_y,1), when there are parameters for both n_x and n_y.
Hi @TMosh. That’s also what I noticed which is a bit weird. That’s why I asked him to remove all code mistakes first then let me know if there’s still an error message.
@jonrico Hi Johnathan, thanks for getting back to me. I wasn’t sure if you meant that n_y, 1 should be the definition of b or just the shape, but I tried both with n_y and still have the same error.
### START CODE HERE ### (~ 2 lines of code)
W = np.random.randn(n_y, n_x) * 0.01
b = np.zeros((n_y, 1))
### END CODE HERE ###
assert (W.shape == (n_y, 1))
assert (b.shape == (n_y, 1))
I just noticed that you might have accidentally edited the assert line:
assert (W.shape == (n_y, 1))
This is not part of the editable code for grading. So in general, you should avoid editing codes outside the “START CODE HERE” and “END CODE HERE” to avoid unnecessary errors.