TF 2.0 is out! Get hands-on practice at TF World, Oct 28-31. Use code TF20 for 20% off select passes. Register now

tf.contrib.autograph.ConversionOptions

View source on GitHub

Class ConversionOptions

Immutable container for global conversion flags.

Attributes:

  • recursive: bool, whether to recursively convert any user functions or classes that the converted function may use.
  • force_conversion: bool, whether to force convertinng the target entity. When force_conversion is turned off, the converter may decide to return the function as-is.
  • optional_features: Union[Feature, Set[Feature]], controls the use of optional features in the conversion process. See Feature for available options.

__init__

View source

__init__(
    recursive=False,
    force_conversion=False,
    internal_convert_user_code=True,
    optional_features=tf.autograph.experimental.Feature.ALL
)

Methods

__eq__

View source

__eq__(other)

as_tuple

View source

as_tuple()

to_ast

View source

to_ast(internal_convert_user_code=None)

Returns a representation of this object as an AST node.

The AST node encodes a constructor that would create an object with the same contents.

Args:

  • internal_convert_user_code: Optional[bool], allows ovrriding the corresponding value.

Returns:

ast.Node

uses

View source

uses(feature)