tf.autograph.experimental.Feature

This enumeration represents optional conversion options.

These conversion options are experimental. They are subject to change without notice and offer no guarantees.

Example Usage

optionals= tf.autograph.experimental.Feature.EQUALITY_OPERATORS
@tf.function(experimental_autograph_options=optionals)
def f(i):
  if i == 0:  # EQUALITY_OPERATORS allows the use of == here.
    tf.print('i is zero')

ALLEnable all features.
AUTO_CONTROL_DEPSInsert of control dependencies in the generated code.
ASSERT_STATEMENTSConvert Tensor-dependent assert statements to tf.Assert.
BUILTIN_FUNCTIONSConvert builtin functions applied to Tensors to their TF counterparts.
EQUALITY_OPERATORSWhether to convert the equality operator ('==') to tf.math.equal.
LISTSConvert list idioms, like initializers, slices, append, etc.
NAME_SCOPESInsert name scopes that name ops according to context, like the function they were defined in.

ALL<Feature.ALL: 'ALL'>
ASSERT_STATEMENTS<Feature.ASSERT_STATEMENTS: 'ASSERT_STATEMENTS'>
AUTO_CONTROL_DEPS<Feature.AUTO_CONTROL_DEPS: 'AUTO_CONTROL_DEPS'>
BUILTIN_FUNCTIONS<Feature.BUILTIN_FUNCTIONS: 'BUILTIN_FUNCTIONS'>
EQUALITY_OPERATORS<Feature.EQUALITY_OPERATORS: 'EQUALITY_OPERATORS'>
LISTS<Feature.LISTS: 'LISTS'>
NAME_SCOPES<Feature.NAME_SCOPES: 'NAME_SCOPES'>