Last active
October 22, 2018 12:49
-
-
Save bushaev/d10d8aa294f79a72b6a550701397ba9b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| for t in range(num_iterations): | |
| g = compute_gradient(x, y) | |
| m = beta_1 * m + (1 - beta_1) * g | |
| v = beta_2 * v + (1 - beta_2) * np.power(g, 2) | |
| m_hat = m / (1 - np.power(beta_1, t)) + (1 - beta_1) * g / (1 - np.power(beta_1, t)) | |
| v_hat = v / (1 - np.power(beta_2, t)) | |
| w = w - step_size * m_hat / (np.sqrt(v_hat) + epsilon) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment