C2 W3 Exercise 7

When creating a post, please add:

  • Week # must be added in the tags option of the post.
    Code used:
def nn_model(X, Y, n_h, num_iterations=10, learning_rate=1.2, 
# mentor edit: code removed
  • getting this error for exercise 7
    Test case “extra_check”. Wrong shape of the weights matrix W1.
    Expected: (3, 2).
    Got: (2, 2).
    Test case “extra_check”. Wrong shape of the bias vector b1.
    Expected: (3, 1).
    Got: (2, 1).
    Test case “extra_check”. Wrong shape of the weights matrix W2.
    Expected: (1, 3).
    Got: (1, 2).

Please refrain from sharing your code publicly on the forum. This is against our Code of Conduct. If a mentor requires access to your code to assist you, they will reach out to you directly via a private message

Hint:
Do not use hard-coded parameters.
image