From 07a248c2c4edc2f91a812eb8ac2f8f4f80771d5f Mon Sep 17 00:00:00 2001 From: Dan Moldovan Date: Tue, 13 Nov 2018 16:50:30 -0800 Subject: [PATCH] Enable autograph by default in defun. PiperOrigin-RevId: 221358807 --- tensorflow/python/eager/function.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tensorflow/python/eager/function.py b/tensorflow/python/eager/function.py index c429dd359bb..e4a5fefe763 100644 --- a/tensorflow/python/eager/function.py +++ b/tensorflow/python/eager/function.py @@ -724,7 +724,7 @@ class PolymorphicFunction(object): name, input_signature=None, attributes=None, - autograph=False): + autograph=True): """Initializes a polymorphic function. Args: @@ -1137,7 +1137,7 @@ def validate_signature(signature): "a possibly nested sequence of TensorSpec objects.") -def defun(func=None, input_signature=None, autograph=False): +def defun(func=None, input_signature=None, autograph=True): """Compiles a Python function into a callable TensorFlow graph. `defun` (short for "define function") trace-compiles a Python function @@ -1470,7 +1470,7 @@ def defun(func=None, input_signature=None, autograph=False): def defun_with_attributes(func=None, input_signature=None, attributes=None, - autograph=False): + autograph=True): """Compiles a Python function into a callable TensorFlow graph. This function supports adding extra function attributes. See detailed