Skip to content

Instantly share code, notes, and snippets.

@bushaev
Last active October 22, 2018 12:49
Show Gist options
  • Select an option

  • Save bushaev/cde2462d6eb402976f9f33a8a251a593 to your computer and use it in GitHub Desktop.

Select an option

Save bushaev/cde2462d6eb402976f9f33a8a251a593 to your computer and use it in GitHub Desktop.
for t in range(num_iterations):
g = compute_gradient(x, y)
m = beta_1 * m + (1 - beta_1) * g
m_hat = m / (1 - np.power(beta_1, t))
v = np.maximum(beta_2 * v, np.abs(g))
w = w - step_size * m_hat / v
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment