Skip to content

Instantly share code, notes, and snippets.

@alessiamarcolini
Created May 7, 2018 20:53
Show Gist options
  • Save alessiamarcolini/6358d3aaa4df4c6074fcec007caf7b0a to your computer and use it in GitHub Desktop.
Save alessiamarcolini/6358d3aaa4df4c6074fcec007caf7b0a to your computer and use it in GitHub Desktop.
Time Based Learning Rate Schedule - Keras
# Compile model
epochs = 50
learning_rate = 0.1
decay_rate = learning_rate / epochs
momentum = 0.8
sgd = SGD(lr=learning_rate, momentum=momentum, decay=decay_rate, nesterov=False)
model.compile(loss='binary_crossentropy', optimizer=sgd, metrics=['accuracy'])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment