Module: tf.contrib.eager

TensorFlow Eager execution prototype.

EXPERIMENTAL: APIs here are unstable and likely to change without notice.

To use, at program startup, call tf.compat.v1.enable_eager_execution().

Modules

metrics module: Metrics namespace.

Classes

class Checkpoint: Groups trackable objects, saving and restoring them.

class Checkpointable: Manages dependencies on other objects.

class EagerVariableStore: Wrapper allowing functional layers to be used with eager execution.

class ExecutionCallback: Valid callback actions.

class GradientTape: Record operations for automatic differentiation.

class Iterator: An iterator producing tf.Tensor objects from a tf.data.Dataset.

class Network: Represents the composition of a set of Layers.

class Saver: A tf.compat.v1.train.Saver adapter for use when eager execution is enabled.

class Sequential: Represents a linear sequence of Layers or functions.

class TensorSpec: Describes a tf.Tensor.

class Variable: Variable based on resource handles.

Functions

add_execution_callback(...): Add an execution callback to the default eager context.

async_clear_error(...): Clears errors raised during ASYNC execution mode.

async_wait(...): Waits for ops dispatched in ASYNC mode to finish.

clear_execution_callbacks(...): Clear all execution callbacks from the default eager context.

connect_to_remote_host(...): Connects to a single machine to enable remote execution on it.

custom_gradient(...): Decorator to define a function with a custom gradient.

defun(...): Compiles a Python function into a callable TensorFlow graph.

enable_eager_execution(...): Enables eager execution for the lifetime of this program.

enable_remote_eager_execution(...): Enables eager execution for the lifetime of this program.

errstate(...): Context manager setting error state.

executing_eagerly(...): Returns True if the current thread has eager execution enabled.

execution_mode(...): Context manager for setting execution mode for current thread.

function(...): Creates a callable TensorFlow graph from a Python function.

get_optimizer_variables(...): Returns a list of variables for the given tf.compat.v1.train.Optimizer.

gradients_function(...): Returns a function which differentiates f with respect to params.

implicit_gradients(...): Returns a function which differentiates f with respect to variables.

implicit_value_and_gradients(...): Returns a function which differentiates f with respect to variables.

in_eager_mode(...): Returns True if the current thread has eager execution enabled.

inf_callback(...): A specialization of inf_nan_callback that checks for infs only.

inf_nan_callback(...): An execution callback that checks for infs and nans in output tensors.

list_devices(...): List the names of the available devices.

make_template(...): Make a template, optionally compiling func_ into a graph function.

nan_callback(...): A specialization of inf_nan_callback that checks for nans only.

num_gpus(...): Get the number of available GPU devices.

py_func(...): Wraps a python function into a TensorFlow op that executes it eagerly.

restore_network_checkpoint(...): Restore the Network from a checkpoint. (deprecated)

restore_variables_on_create(...): ContextManager that restores variables on creation.

run(...): Runs the program with an optional main function and argv list.

run_all_tests_in_graph_and_eager_modes(...): Execute all test methods in the given class with and without eager.

run_test_in_graph_and_eager_modes(...): Execute the decorated test with and without enabling eager execution.

save_network_checkpoint(...): Save variables from the Network to a checkpoint. (deprecated)

set_execution_mode(...): Sets execution mode for the current thread.

set_server_def(...)

seterr(...): Set how abnormal conditions are handled by the default eager context.

value_and_gradients_function(...): Returns a function that computes f and its derivative w.r.t. params.

Other Members

  • ASYNC = 1
  • DEVICE_PLACEMENT_EXPLICIT = 0
  • DEVICE_PLACEMENT_SILENT = 2
  • DEVICE_PLACEMENT_WARN = 1
  • SYNC = 0

© 2020 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/eager