Skip to content

Instantly share code, notes, and snippets.

@omarsar
Created August 13, 2018 07:23
Show Gist options
  • Save omarsar/b945599c88c14556a233bbf879456e52 to your computer and use it in GitHub Desktop.
Save omarsar/b945599c88c14556a233bbf879456e52 to your computer and use it in GitHub Desktop.
NN = Neural_Network()
for i in range(1000): # trains the NN 1,000 times
print ("#" + str(i) + " Loss: " + str(torch.mean((y - NN(X))**2).detach().item())) # mean sum squared loss
NN.train(X, y)
NN.saveWeights(NN)
NN.predict()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment