Skip to content

Instantly share code, notes, and snippets.

@lxuechen
Created August 3, 2018 19:39
Show Gist options
  • Save lxuechen/94629057497b19c9807ea9a6910eb781 to your computer and use it in GitHub Desktop.
Save lxuechen/94629057497b19c9807ea9a6910eb781 to your computer and use it in GitHub Desktop.
defun optimizer
def apply_gradients(optimizer, gradients, variables, global_step=None):
optimizer.apply_gradients(
zip(gradients, variables), global_step=global_step)
apply_gradients = tfe.defun(apply_gradients)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment