Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
exponential decay with TensorFlow
initial_learning_rate = 0.1
lr_schedule = tf.keras.optimizers.schedules.ExponentialDecay(
initial_learning_rate,
decay_steps = 100000,
decay_rate = 0.96,
staircase = True)
model.compile(optimizer=tf.keras.optimizers.SGD(learning_rate = lr_schedule),
loss = 'sparse_categorical_crossentropy',
metrics = ['accuracy'])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment