Enable autograph by default in defun.
PiperOrigin-RevId: 221358807
This commit is contained in:
parent
c4a6eb5857
commit
07a248c2c4
@ -724,7 +724,7 @@ class PolymorphicFunction(object):
|
|||||||
name,
|
name,
|
||||||
input_signature=None,
|
input_signature=None,
|
||||||
attributes=None,
|
attributes=None,
|
||||||
autograph=False):
|
autograph=True):
|
||||||
"""Initializes a polymorphic function.
|
"""Initializes a polymorphic function.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
@ -1137,7 +1137,7 @@ def validate_signature(signature):
|
|||||||
"a possibly nested sequence of TensorSpec objects.")
|
"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.
|
"""Compiles a Python function into a callable TensorFlow graph.
|
||||||
|
|
||||||
`defun` (short for "define function") trace-compiles a Python function
|
`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,
|
def defun_with_attributes(func=None,
|
||||||
input_signature=None,
|
input_signature=None,
|
||||||
attributes=None,
|
attributes=None,
|
||||||
autograph=False):
|
autograph=True):
|
||||||
"""Compiles a Python function into a callable TensorFlow graph.
|
"""Compiles a Python function into a callable TensorFlow graph.
|
||||||
|
|
||||||
This function supports adding extra function attributes. See detailed
|
This function supports adding extra function attributes. See detailed
|
||||||
|
Loading…
x
Reference in New Issue
Block a user