Skip to content

Instantly share code, notes, and snippets.

@shamdasani
Created August 5, 2017 04:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shamdasani/7fb83998e76214352fa1165f26c41634 to your computer and use it in GitHub Desktop.
Save shamdasani/7fb83998e76214352fa1165f26c41634 to your computer and use it in GitHub Desktop.
NN = Neural_Network()
for i in xrange(1,000): # trains the NN 1,000 times
print "Input: \n" + str(X)
print "Actual Output: \n" + str(y)
print "Predicted Output: \n" + str(NN.forward(X))
print "Loss: \n" + str(np.mean(np.square(y - NN.forward(X)))) # mean sum squared loss
print "\n"
NN.train(X, y)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment