Retrieve each parameter from the dictionary “parameters”.
### START CODE HERE ### (~ 4 lines of code)
W1 = 'W1'
b1 = 'b1'
W2 = 'W2'
b2 = 'b2'
### END CODE HERE ###
# Implement forward propagation to calculate A2.
### START CODE HERE ### (~ 4 lines of code)
Z1 = np.matmul(W1, X) + b1
A1 = sigmoid(Z1)
Z2 = np.matmul(W2, X) + b2
A2 = sigmoid(Z2)
### END CODE HERE ###
assert(A2.shape == (n_y, X.shape[1]))
cache = {"Z1": Z1,
"A1": A1,
"Z2": Z2,
"A2": A2}
return A2, cache
Input operand 0 does not have enough dimensions (has 0, gufunc core with signature (n?,k),(k,m?)->(n?,m?) requires 1)