Created
October 24, 2018 15:21
-
-
Save muhammadgaffar/f820ff61788477cad465dd074e0dc95f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def linear_activation_backward(dA, cache, activation): | |
linear_cache, activation_cache = cache | |
if activation == "relu": | |
dZ = relu_backward(dA, activation_cache) | |
dA_prev, dW, db = linear_backward(dZ, linear_cache) | |
elif activation == "sigmoid": | |
dZ = sigmoid_backward(dA, activation_cache) | |
dA_prev, dW, db = linear_backward(dZ, linear_cache) | |
return dA_prev, dW, db |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment