Skip to content

Instantly share code, notes, and snippets.

@sayakpaul
Created May 2, 2020 03:06
Show Gist options
  • Save sayakpaul/b681fd2e4ce9011ab640a9d513dbbee1 to your computer and use it in GitHub Desktop.
Save sayakpaul/b681fd2e4ce9011ab640a9d513dbbee1 to your computer and use it in GitHub Desktop.
opt = Adam(learning_rate=1e-4)
opt = tf.keras.mixed_precision.experimental.LossScaleOptimizer(opt, "dynamic")
model.compile(loss="categorical_crossentropy",
optimizer=opt,
metrics=["accuracy"])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment