Switch default for autograph.(to_graph|to_code|convert) to optional_features=None to better align with tf.function
PiperOrigin-RevId: 243108206
This commit is contained in:
parent
1942fea1b8
commit
80a47e09c9
@ -60,7 +60,7 @@ def is_autograph_strict_conversion_mode():
|
|||||||
# to write converter.
|
# to write converter.
|
||||||
def convert(
|
def convert(
|
||||||
recursive=False,
|
recursive=False,
|
||||||
optional_features=converter.Feature.ALL):
|
optional_features=None):
|
||||||
"""Decorator that compiles a function to use TensorFlow ops.
|
"""Decorator that compiles a function to use TensorFlow ops.
|
||||||
|
|
||||||
The decorator is dynamic - it recompiles the target whenever the decorated
|
The decorator is dynamic - it recompiles the target whenever the decorated
|
||||||
@ -370,7 +370,7 @@ def to_graph(entity,
|
|||||||
recursive=True,
|
recursive=True,
|
||||||
arg_values=None,
|
arg_values=None,
|
||||||
arg_types=None,
|
arg_types=None,
|
||||||
experimental_optional_features=converter.Feature.ALL):
|
experimental_optional_features=None):
|
||||||
"""Converts a Python entity into a TensorFlow graph.
|
"""Converts a Python entity into a TensorFlow graph.
|
||||||
|
|
||||||
Also see: `tf.autograph.to_code`, `tf.function`.
|
Also see: `tf.autograph.to_code`, `tf.function`.
|
||||||
@ -454,7 +454,7 @@ def to_code(entity,
|
|||||||
arg_values=None,
|
arg_values=None,
|
||||||
arg_types=None,
|
arg_types=None,
|
||||||
indentation=' ',
|
indentation=' ',
|
||||||
experimental_optional_features=converter.Feature.ALL):
|
experimental_optional_features=None):
|
||||||
"""Similar to `to_graph`, but returns Python source code as a string.
|
"""Similar to `to_graph`, but returns Python source code as a string.
|
||||||
|
|
||||||
Also see: `tf.autograph.to_graph`.
|
Also see: `tf.autograph.to_graph`.
|
||||||
|
@ -10,11 +10,11 @@ tf_module {
|
|||||||
}
|
}
|
||||||
member_method {
|
member_method {
|
||||||
name: "to_code"
|
name: "to_code"
|
||||||
argspec: "args=[\'entity\', \'recursive\', \'arg_values\', \'arg_types\', \'indentation\', \'experimental_optional_features\'], varargs=None, keywords=None, defaults=[\'True\', \'None\', \'None\', \' \', \'Feature.ALL\'], "
|
argspec: "args=[\'entity\', \'recursive\', \'arg_values\', \'arg_types\', \'indentation\', \'experimental_optional_features\'], varargs=None, keywords=None, defaults=[\'True\', \'None\', \'None\', \' \', \'None\'], "
|
||||||
}
|
}
|
||||||
member_method {
|
member_method {
|
||||||
name: "to_graph"
|
name: "to_graph"
|
||||||
argspec: "args=[\'entity\', \'recursive\', \'arg_values\', \'arg_types\', \'experimental_optional_features\'], varargs=None, keywords=None, defaults=[\'True\', \'None\', \'None\', \'Feature.ALL\'], "
|
argspec: "args=[\'entity\', \'recursive\', \'arg_values\', \'arg_types\', \'experimental_optional_features\'], varargs=None, keywords=None, defaults=[\'True\', \'None\', \'None\', \'None\'], "
|
||||||
}
|
}
|
||||||
member_method {
|
member_method {
|
||||||
name: "trace"
|
name: "trace"
|
||||||
|
@ -10,11 +10,11 @@ tf_module {
|
|||||||
}
|
}
|
||||||
member_method {
|
member_method {
|
||||||
name: "to_code"
|
name: "to_code"
|
||||||
argspec: "args=[\'entity\', \'recursive\', \'arg_values\', \'arg_types\', \'indentation\', \'experimental_optional_features\'], varargs=None, keywords=None, defaults=[\'True\', \'None\', \'None\', \' \', \'Feature.ALL\'], "
|
argspec: "args=[\'entity\', \'recursive\', \'arg_values\', \'arg_types\', \'indentation\', \'experimental_optional_features\'], varargs=None, keywords=None, defaults=[\'True\', \'None\', \'None\', \' \', \'None\'], "
|
||||||
}
|
}
|
||||||
member_method {
|
member_method {
|
||||||
name: "to_graph"
|
name: "to_graph"
|
||||||
argspec: "args=[\'entity\', \'recursive\', \'arg_values\', \'arg_types\', \'experimental_optional_features\'], varargs=None, keywords=None, defaults=[\'True\', \'None\', \'None\', \'Feature.ALL\'], "
|
argspec: "args=[\'entity\', \'recursive\', \'arg_values\', \'arg_types\', \'experimental_optional_features\'], varargs=None, keywords=None, defaults=[\'True\', \'None\', \'None\', \'None\'], "
|
||||||
}
|
}
|
||||||
member_method {
|
member_method {
|
||||||
name: "trace"
|
name: "trace"
|
||||||
|
Loading…
Reference in New Issue
Block a user