Hi,
I am following: LINEAR → RELU → LINEAR → RELU → LINEAR
in # GRADED FUNCTION: forward_propagation
def forward_propagation(X, parameters): function after doing this:
YOUR CODE STARTS HERE
Z1 = tf.math.add(tf.linalg.matmul(W1, X), b1) # Z1 = np.dot(W1, X) + b1
A1 = tf.keras.activations.relu(Z1) # A1 = relu(Z1)
Z2 = tf.math.add(tf.linalg.matmul(W2, A1), b2) # Z2 = np.dot(W2, a1) + b2
A2 = tf.keras.activations.relu(Z2) # A2 = relu(Z2)
Z3 = tf.math.add(tf.linalg.matmul(W3, A2), b3) # Z3 = np.dot(W3,Z2) + b3
# YOUR CODE ENDS HERE
Getting following error:
NameError Traceback (most recent call last)
in
18 print("\033[92mAll test passed")
19
—> 20 forward_propagation_test(forward_propagation, new_train)
in forward_propagation_test(target, examples)
2 minibatches = examples.batch(2)
3 for minibatch in minibatches:
----> 4 forward_pass = target(tf.transpose(minibatch), parameters)
5 print(forward_pass)
6 assert type(forward_pass) == EagerTensor, “Your output is not a tensor”
NameError: name ‘parameters’ is not defined