Skip to content

Instantly share code, notes, and snippets.

@khanhnamle1994
Created May 21, 2018 04:01
Show Gist options
  • Save khanhnamle1994/78c0177f6b93ee47cf4b28ca1916be05 to your computer and use it in GitHub Desktop.
Save khanhnamle1994/78c0177f6b93ee47cf4b28ca1916be05 to your computer and use it in GitHub Desktop.
Stochastic Gradient Descent
def sgd(self, x, y, learning_rate):
dU, dW, dV = self.bptt(x, y)
self.U -= learning_rate * dU
self.V -= learning_rate * dV
self.W -= learning_rate * dW
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment