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.
  • user_requested: bool, whether the conversion was explicitly requested by the user, as opposed to being performed as a result of other logic. This value always auto-resets resets to False in child conversions.
  • 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,
    user_requested=False,
    internal_convert_user_code=True,
    optional_features=tf.autograph.experimental.Feature.ALL
)

Initialize self. See help(type(self)) for accurate signature.

Methods

tf.contrib.autograph.ConversionOptions.__eq__

View source

__eq__(other)

Return self==value.

tf.contrib.autograph.ConversionOptions.as_tuple

View source

as_tuple()

tf.contrib.autograph.ConversionOptions.call_options

View source

call_options()

Returns the corresponding options to be used for recursive conversion.

tf.contrib.autograph.ConversionOptions.to_ast

View source

to_ast()

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.

Returns:

ast.Node

tf.contrib.autograph.ConversionOptions.uses

View source

uses(feature)