Skip to content

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

@asuka08

Description

@asuka08

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")

你认为呢?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions