Skip to content

Instantly share code, notes, and snippets.

@lxuechen
Created August 3, 2018 19:39
Show Gist options
  • Save lxuechen/bad7cd680b25d726b6a2600c636b5d52 to your computer and use it in GitHub Desktop.
Save lxuechen/bad7cd680b25d726b6a2600c636b5d52 to your computer and use it in GitHub Desktop.
general defun
tfe = tf.contrib.eager
model.call = tfe.defun(model.call)
model.compute_gradients = tfe.defun(model.compute_gradients)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment