Skip to content

Instantly share code, notes, and snippets.

@gabrielkirsten
Created February 17, 2019 22:07
Show Gist options
  • Save gabrielkirsten/6ec6f5fca79835c8169e391989470aca to your computer and use it in GitHub Desktop.
Save gabrielkirsten/6ec6f5fca79835c8169e391989470aca to your computer and use it in GitHub Desktop.
SGD
for i in range(nb_epochs):
np.random.shufle(data)
for example in data:
params_grad = evaluete_gradient(loss_function, example, params)
params = params - learning_rate * params_grad
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment