Skip to content

Instantly share code, notes, and snippets.

@mdhasanai
Created November 11, 2018 07:52
Show Gist options
  • Save mdhasanai/4628d3395b5f17263a07b25a86b2f750 to your computer and use it in GitHub Desktop.
Save mdhasanai/4628d3395b5f17263a07b25a86b2f750 to your computer and use it in GitHub Desktop.
def Network(iteration):
X, Y, W1, W2, b1, b2 = initialization()
for i in range(iteration):
Z1,A1,Z2,A2,error = forward_prop(X,Y,W1,W2,b1,b2)
da1,da2,dz1,dz2,dw1,dw2,db1,db2 = backward_prop(X, Y, W1, W2, b1, b2, Z1,A1,Z2,A2)
W1,W2,b1,b2 = update_parameters(W1,W2,b1,b2,dw1,dw2,dz1,dz2,db1,db2)
print('Iteration {} error: {}'.format(i,error))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment