I am really a little confused on how to begin the backprop chain. I know I have two levels. I know the *caches" structure FOR THE TEST EXAMPLES as a list of 2 nested tuples. I know I have get info in LIFO order for the Linear-Activation part. But I am stuck on the most basic. How to get the Sigmoid Linear. derivative.
I don’t think that this the proper start. It seems like the start for the Linear Activation LOOP. But what do I do to for the sigmoid?
###Lth layer (SIGMOID → LINEAR) gradients. Inputs: “dAL, current_cache”. Outputs: "grads[“dAL-1”], grads[“dWL”], grads[“dbL”] ##
current_cache=caches[L-1] ← this would be the LAST IN
prev_temp, dW_temp, db_temp = linear_activation_backward(dAL, current_cache,“sigmoid”)
grads[“dA” + str(L-1)] = dA_prev_temp
grads[“dW” + str(L)] = dW_temp
grads[“db” + str(L)] = db_temp
This gives me a key error
KeyError Traceback (most recent call last)
in
2 grads = L_model_backward(t_AL, t_Y_assess, t_caches)
3
----> 4 print("dA0 = " + str(grads[‘dA0’]))
5 print("dA1 = " + str(grads[‘dA1’]))
6 print("dW1 = " + str(grads[‘dW1’]))
KeyError: ‘dA0’
Any help ? . Thanks