Skip to content

Instantly share code, notes, and snippets.

View gabrielkirsten's full-sized avatar
🟪

Gabriel Kirsten Menezes gabrielkirsten

🟪
View GitHub Profile
@gabrielkirsten
gabrielkirsten / docker-helper.sh
Last active June 27, 2019 12:17
Docker helper
###############################
Install Docker
###############################
# get a docker instalation script
curl -fsSL https://get.docker.com -o get-docker.sh
# execute the instalation script
sudo sh get-docker.sh
@gabrielkirsten
gabrielkirsten / sgd-mini-batch.py
Created February 17, 2019 22:08
SGD mini batch
for i in range(nb_epochs):
np.random.shufle(data)
for example in get(batches(data, batch_size=50):
params_grad = evaluate_gradient(loss_function, batch, params)
params = params - learning_rate * params_grad
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