Last active
October 8, 2018 22:48
-
-
Save SkalskiP/8be2a128d3bc6a5e444fe63c1167f9f8 to your computer and use it in GitHub Desktop.
Full forward propagation
This file contains hidden or 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 full_forward_propagation(X, params_values, nn_architecture): | |
| memory = {} | |
| A_curr = X | |
| for idx, layer in enumerate(nn_architecture): | |
| layer_idx = idx + 1 | |
| A_prev = A_curr | |
| activ_function_curr = layer["activation"] | |
| W_curr = params_values["W" + str(layer_idx)] | |
| b_curr = params_values["b" + str(layer_idx)] | |
| A_curr, Z_curr = single_layer_forward_propagation(A_prev, W_curr, b_curr, activ_function_curr) | |
| memory["A" + str(idx)] = A_prev | |
| memory["Z" + str(layer_idx)] = Z_curr | |
| return A_curr, memory |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment