Not sure what mistake I am doing. Kindly please help

Please check the following:

parameters["W1"].shape == v_corrected["dW1"].shape == s_corrected["dW1"].shape == (2, 3)
parameters["W2"].shape == v_corrected["dW2"].shape == s_corrected["dW2"].shape == (3, 3)

Why are you using math.sqrt there? The inputs are not scalars, right? The math package only deals with scalars. Numpy has its own square root function. Try np.sqrt. And it even works on scalars as well, so there’s really never any reason to use the math package once you have numpy available.

Perfect, Thankyou ! My issue is resolved :blush: