Created
December 31, 2019 11:34
-
-
Save SuvroBaner/2ac8542c3d0f388a197e2a6b81983e99 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 forward_propagation(X, parameters): | |
# Retrieve the parameters from the dictionary "parameters" | |
W1 = parameters['W1'] | |
b1 = parameters['b1'] | |
W2 = parameters['W2'] | |
b2 = parameters['b2'] | |
W3 = parameters['W3'] | |
b3 = parameters['b3'] | |
Z1 = tf.add(tf.matmul(W1, X), b1) | |
A1 = tf.nn.relu(Z1) | |
Z2 = tf.add(tf.matmul(W2, A1), b2) | |
A2 = tf.nn.relu(Z2) | |
Z3 = tf.add(tf.matmul(W3, A2), b3) | |
return Z3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment