tf.autograph.experimental.Feature
Stay organized with collections
Save and categorize content based on your preferences.
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')
Attributes |
ALL
|
Enable all features.
|
AUTO_CONTROL_DEPS
|
Insert of control dependencies in the generated code.
|
ASSERT_STATEMENTS
|
Convert Tensor-dependent assert statements to tf.Assert.
|
BUILTIN_FUNCTIONS
|
Convert builtin functions applied to Tensors to
their TF counterparts.
|
EQUALITY_OPERATORS
|
Whether to convert the comparison operators, like
equality. This is soon to be deprecated as support is being added to the
Tensor class.
|
LISTS
|
Convert list idioms, like initializers, slices, append, etc.
|
NAME_SCOPES
|
Insert name scopes that name ops according to context, like the
function they were defined in.
|
Class Variables
ALL
ASSERT_STATEMENTS
AUTO_CONTROL_DEPS
BUILTIN_FUNCTIONS
EQUALITY_OPERATORS
LISTS
NAME_SCOPES
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2020-10-01 UTC.
[null,null,["Last updated 2020-10-01 UTC."],[],[],null,["# tf.autograph.experimental.Feature\n\n\u003cbr /\u003e\n\n|-------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------|\n| [TensorFlow 1 version](/versions/r1.15/api_docs/python/tf/autograph/experimental/Feature) | [View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v2.3.0/tensorflow/python/autograph/core/converter.py#L84-L133) |\n\nThis enumeration represents optional conversion options.\n\n#### View aliases\n\n\n**Compat aliases for migration**\n\nSee\n[Migration guide](https://www.tensorflow.org/guide/migrate) for\nmore details.\n\n[`tf.compat.v1.autograph.experimental.Feature`](/api_docs/python/tf/autograph/experimental/Feature)\n\n\u003cbr /\u003e\n\nThese conversion options are experimental. They are subject to change without\nnotice and offer no guarantees.\n\n*Example Usage* \n\n optionals= tf.autograph.experimental.Feature.EQUALITY_OPERATORS\n @tf.function(experimental_autograph_options=optionals)\n def f(i):\n if i == 0: # EQUALITY_OPERATORS allows the use of == here.\n tf.print('i is zero')\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Attributes ---------- ||\n|----------------------|------------------------------------------------------------------------------------------------------------------------------------------|\n| `ALL` | Enable all features. |\n| `AUTO_CONTROL_DEPS` | Insert of control dependencies in the generated code. |\n| `ASSERT_STATEMENTS` | Convert Tensor-dependent assert statements to tf.Assert. |\n| `BUILTIN_FUNCTIONS` | Convert builtin functions applied to Tensors to their TF counterparts. |\n| `EQUALITY_OPERATORS` | Whether to convert the comparison operators, like equality. This is soon to be deprecated as support is being added to the Tensor class. |\n| `LISTS` | Convert list idioms, like initializers, slices, append, etc. |\n| `NAME_SCOPES` | Insert name scopes that name ops according to context, like the function they were defined in. |\n\n\u003cbr /\u003e\n\nClass Variables\n---------------\n\n- `ALL`\n- `ASSERT_STATEMENTS`\n- `AUTO_CONTROL_DEPS`\n- `BUILTIN_FUNCTIONS`\n- `EQUALITY_OPERATORS`\n- `LISTS`\n- `NAME_SCOPES`"]]