Skip to content

Commit 457b183

Browse files
authored
Merge pull request #7 from jayaneetha/patch-1
Change in L_model_backward function
2 parents 9936d33 + 6da7c06 commit 457b183

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

py/Building your Deep Neural Network Step by Step v3.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -920,7 +920,7 @@ def L_model_backward(AL, Y, caches):
920920
# Inputs: "grads["dA" + str(l + 2)], caches". Outputs: "grads["dA" + str(l + 1)] , grads["dW" + str(l + 1)] , grads["db" + str(l + 1)]
921921
### START CODE HERE ### (approx. 5 lines)
922922
current_cache = caches[l]
923-
dA_prev_temp, dW_temp, db_temp = linear_activation_backward(grads["dA" + str(L)], current_cache, activation = "relu")
923+
dA_prev_temp, dW_temp, db_temp = linear_activation_backward(grads["dA" + str(l+1)], current_cache, activation = "relu")
924924
grads["dA" + str(l + 1)] = dA_prev_temp
925925
grads["dW" + str(l + 1)] = dW_temp
926926
grads["db" + str(l + 1)] = db_temp

0 commit comments

Comments
 (0)