Coursera-Deep-Learning-deeplearning.ai icon indicating copy to clipboard operation
Coursera-Deep-Learning-deeplearning.ai copied to clipboard

第一张第4周作业答案有问题

Open asuka08 opened this issue 6 years ago • 0 comments

01-Neural Networks and Deep Learning/week4/answer-Building your Deep Neural Network-Step by Step.ipynb 函数 L_model_backward 中有一段for循环

for l in reversed(range(L-1)):
    current_cache = caches[L - 2 - l]
    dA_prev_temp, dW_temp, db_temp = linear_activation_backward(grads["dA" + str(L)], current_cache, activation = 'relu')

我感觉有点问题。 我的答案是

for l in reversed(range(L - 1)):
    current_cache = caches[l]
    dA_prev_temp, dW_temp, db_temp = linear_activation_backward(grads["dA" + str(l + 2)], current_cache, "relu")

你认为呢?

asuka08 avatar Aug 03 '18 01:08 asuka08