TensorFlow 2.0 Beta is available Learn more

tf.contrib.autograph.ConversionOptions

Class ConversionOptions

Immutable container for global conversion flags.

Defined in python/autograph/core/converter.py.

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__

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

Methods

__eq__

__eq__(other)

as_tuple

as_tuple()

to_ast

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

uses(feature)