Week 1 Assignment 2 - debugging

Hello, Can someone help with pointing out the bug in this code? I am stumped…

Chapter 5 – L2 Regularization:
This is the only line I entered:
L2_regularization_cost = (1/m)(lambd/2)(np.sum(np.square(Wl)) + np.sum(np.square(W2)) + np.sum(np.square(W3)))

The error is:

NameError Traceback (most recent call last)
in
1 A3, t_Y, parameters = compute_cost_with_regularization_test_case()
----> 2 cost = compute_cost_with_regularization(A3, t_Y, parameters, lambd=0.1)
3 print("cost = " + str(cost))
4
5 compute_cost_with_regularization_test(compute_cost_with_regularization)

in compute_cost_with_regularization(A3, Y, parameters, lambd)
23 # L2_regularization_cost =
24 # YOUR CODE STARTS HERE
—> 25 L2_regularization_cost = (1/m)(lambd/2)(np.sum(np.square(Wl)) + np.sum(np.square(W2))+np.sum(np.square(W3)))
26 # YOUR CODE ENDS HERE
27

NameError: name ‘Wl’ is not defined

**I have seen that W1 has the correct value using print(W1) but when I use the np.sum(np.square…) it gives this error. **

Hi @nsaraf ,

W1 is not Wl, please check