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/7ad6efd2dbd42c951556b37f87f36ae5 to your computer and use it in GitHub Desktop.

Select an option

Save bushaev/7ad6efd2dbd42c951556b37f87f36ae5 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 / v
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment