<button value="stable" default="">See Stable</button> <button value="nightly">See Nightly</button>

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v2.21.0/tensorflow/__init__.py) |

## TensorFlow

```python
pip install tensorflow
```

## Modules

[`audio`](https://www.tensorflow.org/api_docs/python/tf/audio.md.txt) module: Public API for tf._api.v2.audio namespace

[`autodiff`](https://www.tensorflow.org/api_docs/python/tf/autodiff.md.txt) module: Public API for tf._api.v2.autodiff namespace

[`autograph`](https://www.tensorflow.org/api_docs/python/tf/autograph.md.txt) module: Public API for tf._api.v2.autograph namespace

[`bitwise`](https://www.tensorflow.org/api_docs/python/tf/bitwise.md.txt) module: Public API for tf._api.v2.bitwise namespace

[`compat`](https://www.tensorflow.org/api_docs/python/tf/compat.md.txt) module: Public API for tf._api.v2.compat namespace

[`config`](https://www.tensorflow.org/api_docs/python/tf/config.md.txt) module: Public API for tf._api.v2.config namespace

[`data`](https://www.tensorflow.org/api_docs/python/tf/data.md.txt) module: Public API for tf._api.v2.data namespace

[`debugging`](https://www.tensorflow.org/api_docs/python/tf/debugging.md.txt) module: Public API for tf._api.v2.debugging namespace

[`distribute`](https://www.tensorflow.org/api_docs/python/tf/distribute.md.txt) module: Public API for tf._api.v2.distribute namespace

[`dtypes`](https://www.tensorflow.org/api_docs/python/tf/dtypes.md.txt) module: Public API for tf._api.v2.dtypes namespace

[`errors`](https://www.tensorflow.org/api_docs/python/tf/errors.md.txt) module: Public API for tf._api.v2.errors namespace

[`experimental`](https://www.tensorflow.org/api_docs/python/tf/experimental.md.txt) module: Public API for tf._api.v2.experimental namespace

[`feature_column`](https://www.tensorflow.org/api_docs/python/tf/feature_column.md.txt) module: Public API for tf._api.v2.feature_column namespace

[`graph_util`](https://www.tensorflow.org/api_docs/python/tf/graph_util.md.txt) module: Public API for tf._api.v2.graph_util namespace

[`image`](https://www.tensorflow.org/api_docs/python/tf/image.md.txt) module: Public API for tf._api.v2.image namespace

[`io`](https://www.tensorflow.org/api_docs/python/tf/io.md.txt) module: Public API for tf._api.v2.io namespace

[`keras`](https://www.tensorflow.org/api_docs/python/tf/keras.md.txt) module: DO NOT EDIT.

[`linalg`](https://www.tensorflow.org/api_docs/python/tf/linalg.md.txt) module: Public API for tf._api.v2.linalg namespace

[`lite`](https://www.tensorflow.org/api_docs/python/tf/lite.md.txt) module: Public API for tf._api.v2.lite namespace

[`lookup`](https://www.tensorflow.org/api_docs/python/tf/lookup.md.txt) module: Public API for tf._api.v2.lookup namespace

[`math`](https://www.tensorflow.org/api_docs/python/tf/math.md.txt) module: Public API for tf._api.v2.math namespace

[`mlir`](https://www.tensorflow.org/api_docs/python/tf/mlir.md.txt) module: Public API for tf._api.v2.mlir namespace

[`nest`](https://www.tensorflow.org/api_docs/python/tf/nest.md.txt) module: Public API for tf._api.v2.nest namespace

[`nn`](https://www.tensorflow.org/api_docs/python/tf/nn.md.txt) module: Public API for tf._api.v2.nn namespace

[`profiler`](https://www.tensorflow.org/api_docs/python/tf/profiler.md.txt) module: Public API for tf._api.v2.profiler namespace

[`quantization`](https://www.tensorflow.org/api_docs/python/tf/quantization.md.txt) module: Public API for tf._api.v2.quantization namespace

[`queue`](https://www.tensorflow.org/api_docs/python/tf/queue.md.txt) module: Public API for tf._api.v2.queue namespace

[`ragged`](https://www.tensorflow.org/api_docs/python/tf/ragged.md.txt) module: Public API for tf._api.v2.ragged namespace

[`random`](https://www.tensorflow.org/api_docs/python/tf/random.md.txt) module: Public API for tf._api.v2.random namespace

[`raw_ops`](https://www.tensorflow.org/api_docs/python/tf/raw_ops.md.txt) module: Public API for tf._api.v2.raw_ops namespace

[`saved_model`](https://www.tensorflow.org/api_docs/python/tf/saved_model.md.txt) module: Public API for tf._api.v2.saved_model namespace

[`sets`](https://www.tensorflow.org/api_docs/python/tf/sets.md.txt) module: Public API for tf._api.v2.sets namespace

[`signal`](https://www.tensorflow.org/api_docs/python/tf/signal.md.txt) module: Public API for tf._api.v2.signal namespace

[`sparse`](https://www.tensorflow.org/api_docs/python/tf/sparse.md.txt) module: Public API for tf._api.v2.sparse namespace

[`strings`](https://www.tensorflow.org/api_docs/python/tf/strings.md.txt) module: Public API for tf._api.v2.strings namespace

[`summary`](https://www.tensorflow.org/api_docs/python/tf/summary.md.txt) module: Public API for tf._api.v2.summary namespace

[`sysconfig`](https://www.tensorflow.org/api_docs/python/tf/sysconfig.md.txt) module: Public API for tf._api.v2.sysconfig namespace

[`test`](https://www.tensorflow.org/api_docs/python/tf/test.md.txt) module: Public API for tf._api.v2.test namespace

[`tpu`](https://www.tensorflow.org/api_docs/python/tf/tpu.md.txt) module: Public API for tf._api.v2.tpu namespace

[`train`](https://www.tensorflow.org/api_docs/python/tf/train.md.txt) module: Public API for tf._api.v2.train namespace

[`types`](https://www.tensorflow.org/api_docs/python/tf/types.md.txt) module: Public API for tf._api.v2.types namespace

[`version`](https://www.tensorflow.org/api_docs/python/tf/version.md.txt) module: Public API for tf._api.v2.version namespace

[`xla`](https://www.tensorflow.org/api_docs/python/tf/xla.md.txt) module: Public API for tf._api.v2.xla namespace

## Classes

[`class AggregationMethod`](https://www.tensorflow.org/api_docs/python/tf/AggregationMethod.md.txt): A class listing aggregation methods used to combine gradients.

[`class CriticalSection`](https://www.tensorflow.org/api_docs/python/tf/CriticalSection.md.txt): Critical section.

[`class DType`](https://www.tensorflow.org/api_docs/python/tf/dtypes/DType.md.txt): Represents the type of the elements in a `Tensor`.

[`class DeviceSpec`](https://www.tensorflow.org/api_docs/python/tf/DeviceSpec.md.txt): Represents a (possibly partial) specification for a TensorFlow device.

[`class GradientTape`](https://www.tensorflow.org/api_docs/python/tf/GradientTape.md.txt): Record operations for automatic differentiation.

[`class Graph`](https://www.tensorflow.org/api_docs/python/tf/Graph.md.txt): A TensorFlow computation, represented as a dataflow graph.

[`class IndexedSlices`](https://www.tensorflow.org/api_docs/python/tf/IndexedSlices.md.txt): A sparse representation of a set of tensor slices at given indices.

[`class IndexedSlicesSpec`](https://www.tensorflow.org/api_docs/python/tf/IndexedSlicesSpec.md.txt): Type specification for a [`tf.IndexedSlices`](https://www.tensorflow.org/api_docs/python/tf/IndexedSlices.md.txt).

[`class Module`](https://www.tensorflow.org/api_docs/python/tf/Module.md.txt): Base neural network module class.

[`class NoneTensorSpec`](https://www.tensorflow.org/api_docs/python/tf/NoneTensorSpec.md.txt): Type specification for `None` value.

[`class Operation`](https://www.tensorflow.org/api_docs/python/tf/Operation.md.txt): Represents a graph node that performs computation on tensors.

[`class OptionalSpec`](https://www.tensorflow.org/api_docs/python/tf/OptionalSpec.md.txt): Type specification for [`tf.experimental.Optional`](https://www.tensorflow.org/api_docs/python/tf/experimental/Optional.md.txt).

[`class RaggedTensor`](https://www.tensorflow.org/api_docs/python/tf/RaggedTensor.md.txt): Represents a ragged tensor.

[`class RaggedTensorSpec`](https://www.tensorflow.org/api_docs/python/tf/RaggedTensorSpec.md.txt): Type specification for a [`tf.RaggedTensor`](https://www.tensorflow.org/api_docs/python/tf/RaggedTensor.md.txt).

[`class RegisterGradient`](https://www.tensorflow.org/api_docs/python/tf/RegisterGradient.md.txt): A decorator for registering the gradient function for an op type.

[`class SparseTensor`](https://www.tensorflow.org/api_docs/python/tf/sparse/SparseTensor.md.txt): Represents a sparse tensor.

[`class SparseTensorSpec`](https://www.tensorflow.org/api_docs/python/tf/SparseTensorSpec.md.txt): Type specification for a [`tf.sparse.SparseTensor`](https://www.tensorflow.org/api_docs/python/tf/sparse/SparseTensor.md.txt).

[`class Tensor`](https://www.tensorflow.org/api_docs/python/tf/Tensor.md.txt): A [`tf.Tensor`](https://www.tensorflow.org/api_docs/python/tf/Tensor.md.txt) represents a multidimensional array of elements.

[`class TensorArray`](https://www.tensorflow.org/api_docs/python/tf/TensorArray.md.txt): Class wrapping dynamic-sized, per-time-step, Tensor arrays.

[`class TensorArraySpec`](https://www.tensorflow.org/api_docs/python/tf/TensorArraySpec.md.txt): Type specification for a [`tf.TensorArray`](https://www.tensorflow.org/api_docs/python/tf/TensorArray.md.txt).

[`class TensorShape`](https://www.tensorflow.org/api_docs/python/tf/TensorShape.md.txt): Represents the shape of a `Tensor`.

[`class TensorSpec`](https://www.tensorflow.org/api_docs/python/tf/TensorSpec.md.txt): Describes the type of a tf.Tensor.

[`class TypeSpec`](https://www.tensorflow.org/api_docs/python/tf/TypeSpec.md.txt): Specifies a TensorFlow value type.

[`class UnconnectedGradients`](https://www.tensorflow.org/api_docs/python/tf/UnconnectedGradients.md.txt): Controls how gradient computation behaves when y does not depend on x.

[`class Variable`](https://www.tensorflow.org/api_docs/python/tf/Variable.md.txt): See the [variable guide](https://tensorflow.org/guide/variable).

[`class VariableAggregation`](https://www.tensorflow.org/api_docs/python/tf/VariableAggregation.md.txt): Indicates how a distributed variable will be aggregated.

[`class VariableSynchronization`](https://www.tensorflow.org/api_docs/python/tf/VariableSynchronization.md.txt): Indicates when a distributed variable will be synced.

[`class constant_initializer`](https://www.tensorflow.org/api_docs/python/tf/constant_initializer.md.txt): Initializer that generates tensors with constant values.

[`class name_scope`](https://www.tensorflow.org/api_docs/python/tf/name_scope.md.txt): A context manager for use when defining a Python op.

[`class ones_initializer`](https://www.tensorflow.org/api_docs/python/tf/ones_initializer.md.txt): Initializer that generates tensors initialized to 1.

[`class random_normal_initializer`](https://www.tensorflow.org/api_docs/python/tf/random_normal_initializer.md.txt): Initializer that generates tensors with a normal distribution.

[`class random_uniform_initializer`](https://www.tensorflow.org/api_docs/python/tf/random_uniform_initializer.md.txt): Initializer that generates tensors with a uniform distribution.

[`class zeros_initializer`](https://www.tensorflow.org/api_docs/python/tf/zeros_initializer.md.txt): Initializer that generates tensors initialized to 0.

## Functions

[`Assert(...)`](https://www.tensorflow.org/api_docs/python/tf/debugging/Assert.md.txt): Asserts that the given condition is true.

[`abs(...)`](https://www.tensorflow.org/api_docs/python/tf/math/abs.md.txt): Computes the absolute value of a tensor.

[`acos(...)`](https://www.tensorflow.org/api_docs/python/tf/math/acos.md.txt): Computes acos of x element-wise.

[`acosh(...)`](https://www.tensorflow.org/api_docs/python/tf/math/acosh.md.txt): Computes inverse hyperbolic cosine of x element-wise.

[`add(...)`](https://www.tensorflow.org/api_docs/python/tf/math/add.md.txt): Returns x + y element-wise.

[`add_n(...)`](https://www.tensorflow.org/api_docs/python/tf/math/add_n.md.txt): Returns the element-wise sum of a list of tensors.

[`approx_top_k(...)`](https://www.tensorflow.org/api_docs/python/tf/approx_top_k.md.txt): Returns min/max k values and their indices of the input operand in an approximate manner.

[`argmax(...)`](https://www.tensorflow.org/api_docs/python/tf/math/argmax.md.txt): Returns the index with the largest value across axes of a tensor.

[`argmin(...)`](https://www.tensorflow.org/api_docs/python/tf/math/argmin.md.txt): Returns the index with the smallest value across axes of a tensor.

[`argsort(...)`](https://www.tensorflow.org/api_docs/python/tf/argsort.md.txt): Returns the indices of a tensor that give its sorted order along an axis.

[`as_dtype(...)`](https://www.tensorflow.org/api_docs/python/tf/dtypes/as_dtype.md.txt): Converts the given `type_value` to a [`tf.DType`](https://www.tensorflow.org/api_docs/python/tf/dtypes/DType.md.txt).

[`as_string(...)`](https://www.tensorflow.org/api_docs/python/tf/strings/as_string.md.txt): Converts each entry in the given tensor to strings.

[`asin(...)`](https://www.tensorflow.org/api_docs/python/tf/math/asin.md.txt): Computes the trignometric inverse sine of x element-wise.

[`asinh(...)`](https://www.tensorflow.org/api_docs/python/tf/math/asinh.md.txt): Computes inverse hyperbolic sine of x element-wise.

[`assert_equal(...)`](https://www.tensorflow.org/api_docs/python/tf/debugging/assert_equal.md.txt): Assert the condition `x == y` holds element-wise.

[`assert_greater(...)`](https://www.tensorflow.org/api_docs/python/tf/debugging/assert_greater.md.txt): Assert the condition `x > y` holds element-wise.

[`assert_less(...)`](https://www.tensorflow.org/api_docs/python/tf/debugging/assert_less.md.txt): Assert the condition `x < y` holds element-wise.

[`assert_rank(...)`](https://www.tensorflow.org/api_docs/python/tf/debugging/assert_rank.md.txt): Assert that `x` has rank equal to `rank`.

[`atan(...)`](https://www.tensorflow.org/api_docs/python/tf/math/atan.md.txt): Computes the trignometric inverse tangent of x element-wise.

[`atan2(...)`](https://www.tensorflow.org/api_docs/python/tf/math/atan2.md.txt): Computes arctangent of `y/x` element-wise, respecting signs of the arguments.

[`atanh(...)`](https://www.tensorflow.org/api_docs/python/tf/math/atanh.md.txt): Computes inverse hyperbolic tangent of x element-wise.

[`batch_to_space(...)`](https://www.tensorflow.org/api_docs/python/tf/batch_to_space.md.txt): BatchToSpace for N-D tensors of type T.

[`bitcast(...)`](https://www.tensorflow.org/api_docs/python/tf/bitcast.md.txt): Bitcasts a tensor from one type to another without copying data.

[`boolean_mask(...)`](https://www.tensorflow.org/api_docs/python/tf/boolean_mask.md.txt): Apply boolean mask to tensor.

[`broadcast_dynamic_shape(...)`](https://www.tensorflow.org/api_docs/python/tf/broadcast_dynamic_shape.md.txt): Computes the shape of a broadcast given symbolic shapes.

[`broadcast_static_shape(...)`](https://www.tensorflow.org/api_docs/python/tf/broadcast_static_shape.md.txt): Computes the shape of a broadcast given known shapes.

[`broadcast_to(...)`](https://www.tensorflow.org/api_docs/python/tf/broadcast_to.md.txt): Broadcast an array for a compatible shape.

[`case(...)`](https://www.tensorflow.org/api_docs/python/tf/case.md.txt): Create a case operation.

[`cast(...)`](https://www.tensorflow.org/api_docs/python/tf/cast.md.txt): Casts a tensor to a new type.

[`check_pinned(...)`](https://www.tensorflow.org/api_docs/python/tf/check_pinned.md.txt): Checks whether a tensor is located in host memory pinned for GPU.

[`clip_by_global_norm(...)`](https://www.tensorflow.org/api_docs/python/tf/clip_by_global_norm.md.txt): Clips values of multiple tensors by the ratio of the sum of their norms.

[`clip_by_norm(...)`](https://www.tensorflow.org/api_docs/python/tf/clip_by_norm.md.txt): Clips tensor values to a maximum L2-norm.

[`clip_by_value(...)`](https://www.tensorflow.org/api_docs/python/tf/clip_by_value.md.txt): Clips tensor values to a specified min and max.

[`complex(...)`](https://www.tensorflow.org/api_docs/python/tf/dtypes/complex.md.txt): Converts two real numbers to a complex number.

[`concat(...)`](https://www.tensorflow.org/api_docs/python/tf/concat.md.txt): Concatenates tensors along one dimension.

[`cond(...)`](https://www.tensorflow.org/api_docs/python/tf/cond.md.txt): Return `true_fn()` if the predicate `pred` is true else `false_fn()`.

[`constant(...)`](https://www.tensorflow.org/api_docs/python/tf/constant.md.txt): Creates a constant tensor from a tensor-like object.

[`control_dependencies(...)`](https://www.tensorflow.org/api_docs/python/tf/control_dependencies.md.txt): Wrapper for [`Graph.control_dependencies()`](https://www.tensorflow.org/api_docs/python/tf/Graph.md.txt#control_dependencies) using the default graph.

[`conv(...)`](https://www.tensorflow.org/api_docs/python/tf/conv.md.txt): Computes a N-D convolution given (N+1+batch_dims)-D `input` and (N+2)-D `filter` tensors.

[`conv2d_backprop_filter_v2(...)`](https://www.tensorflow.org/api_docs/python/tf/conv2d_backprop_filter_v2.md.txt): Computes the gradients of convolution with respect to the filter.

[`conv2d_backprop_input_v2(...)`](https://www.tensorflow.org/api_docs/python/tf/conv2d_backprop_input_v2.md.txt): Computes the gradients of convolution with respect to the input.

[`convert_to_tensor(...)`](https://www.tensorflow.org/api_docs/python/tf/convert_to_tensor.md.txt): Converts the given `value` to a `Tensor`.

[`cos(...)`](https://www.tensorflow.org/api_docs/python/tf/math/cos.md.txt): Computes cos of x element-wise.

[`cosh(...)`](https://www.tensorflow.org/api_docs/python/tf/math/cosh.md.txt): Computes hyperbolic cosine of x element-wise.

[`cumsum(...)`](https://www.tensorflow.org/api_docs/python/tf/math/cumsum.md.txt): Compute the cumulative sum of the tensor `x` along `axis`.

[`custom_gradient(...)`](https://www.tensorflow.org/api_docs/python/tf/custom_gradient.md.txt): Decorator to define a function with a custom gradient.

[`device(...)`](https://www.tensorflow.org/api_docs/python/tf/device.md.txt): Specifies the device for ops created/executed in this context.

[`divide(...)`](https://www.tensorflow.org/api_docs/python/tf/math/divide.md.txt): Computes Python style division of `x` by `y`.

[`dynamic_partition(...)`](https://www.tensorflow.org/api_docs/python/tf/dynamic_partition.md.txt): Partitions `data` into `num_partitions` tensors using indices from `partitions`.

[`dynamic_stitch(...)`](https://www.tensorflow.org/api_docs/python/tf/dynamic_stitch.md.txt): Interleave the values from the `data` tensors into a single tensor.

[`edit_distance(...)`](https://www.tensorflow.org/api_docs/python/tf/edit_distance.md.txt): Computes the Levenshtein distance between sequences.

[`eig(...)`](https://www.tensorflow.org/api_docs/python/tf/linalg/eig.md.txt): Computes the eigen decomposition of a batch of matrices.

[`eigvals(...)`](https://www.tensorflow.org/api_docs/python/tf/linalg/eigvals.md.txt): Computes the eigenvalues of one or more matrices.

[`einsum(...)`](https://www.tensorflow.org/api_docs/python/tf/einsum.md.txt): Tensor contraction over specified indices and outer product.

[`ensure_shape(...)`](https://www.tensorflow.org/api_docs/python/tf/ensure_shape.md.txt): Updates the shape of a tensor and checks at runtime that the shape holds.

[`equal(...)`](https://www.tensorflow.org/api_docs/python/tf/math/equal.md.txt): Returns the truth value of (x == y) element-wise.

[`executing_eagerly(...)`](https://www.tensorflow.org/api_docs/python/tf/executing_eagerly.md.txt): Checks whether the current thread has eager execution enabled.

[`exp(...)`](https://www.tensorflow.org/api_docs/python/tf/math/exp.md.txt): Computes exponential of x element-wise. \\(y = e\^x\\).

[`expand_dims(...)`](https://www.tensorflow.org/api_docs/python/tf/expand_dims.md.txt): Returns a tensor with a length 1 axis inserted at index `axis`.

[`extract_volume_patches(...)`](https://www.tensorflow.org/api_docs/python/tf/extract_volume_patches.md.txt): Extract `patches` from `input` and put them in the `"depth"` output dimension. 3D extension of `extract_image_patches`.

[`eye(...)`](https://www.tensorflow.org/api_docs/python/tf/eye.md.txt): Construct an identity matrix, or a batch of matrices.

[`fftnd(...)`](https://www.tensorflow.org/api_docs/python/tf/fftnd.md.txt): ND fast Fourier transform.

[`fill(...)`](https://www.tensorflow.org/api_docs/python/tf/fill.md.txt): Creates a tensor filled with a scalar value.

[`fingerprint(...)`](https://www.tensorflow.org/api_docs/python/tf/fingerprint.md.txt): Generates fingerprint values.

[`floor(...)`](https://www.tensorflow.org/api_docs/python/tf/math/floor.md.txt): Returns element-wise largest integer not greater than x.

[`foldl(...)`](https://www.tensorflow.org/api_docs/python/tf/foldl.md.txt): foldl on the list of tensors unpacked from `elems` on dimension 0. (deprecated argument values)

[`foldr(...)`](https://www.tensorflow.org/api_docs/python/tf/foldr.md.txt): foldr on the list of tensors unpacked from `elems` on dimension 0. (deprecated argument values)

[`function(...)`](https://www.tensorflow.org/api_docs/python/tf/function.md.txt): Compiles a function into a callable TensorFlow graph. (deprecated arguments) (deprecated arguments) (deprecated arguments)

[`gather(...)`](https://www.tensorflow.org/api_docs/python/tf/gather.md.txt): Gather slices from params axis `axis` according to indices. (deprecated arguments)

[`gather_nd(...)`](https://www.tensorflow.org/api_docs/python/tf/gather_nd.md.txt): Gather slices from `params` into a Tensor with shape specified by `indices`.

[`get_current_name_scope(...)`](https://www.tensorflow.org/api_docs/python/tf/get_current_name_scope.md.txt): Returns current full name scope specified by [`tf.name_scope(...)`](https://www.tensorflow.org/api_docs/python/tf/name_scope.md.txt)s.

[`get_logger(...)`](https://www.tensorflow.org/api_docs/python/tf/get_logger.md.txt): Return TF logger instance.

[`get_static_value(...)`](https://www.tensorflow.org/api_docs/python/tf/get_static_value.md.txt): Returns the constant value of the given tensor, if efficiently calculable.

[`grad_pass_through(...)`](https://www.tensorflow.org/api_docs/python/tf/grad_pass_through.md.txt): Creates a grad-pass-through op with the forward behavior provided in f.

[`gradients(...)`](https://www.tensorflow.org/api_docs/python/tf/gradients.md.txt): Constructs symbolic derivatives of sum of `ys` w.r.t. x in `xs`.

[`greater(...)`](https://www.tensorflow.org/api_docs/python/tf/math/greater.md.txt): Returns the truth value of (x \> y) element-wise.

[`greater_equal(...)`](https://www.tensorflow.org/api_docs/python/tf/math/greater_equal.md.txt): Returns the truth value of (x \>= y) element-wise.

[`group(...)`](https://www.tensorflow.org/api_docs/python/tf/group.md.txt): Create an op that groups multiple operations.

[`guarantee_const(...)`](https://www.tensorflow.org/api_docs/python/tf/guarantee_const.md.txt): Promise to the TF runtime that the input tensor is a constant. (deprecated)

[`hessians(...)`](https://www.tensorflow.org/api_docs/python/tf/hessians.md.txt): Constructs the Hessian of sum of `ys` with respect to `x` in `xs`.

[`histogram_fixed_width(...)`](https://www.tensorflow.org/api_docs/python/tf/histogram_fixed_width.md.txt): Return histogram of values.

[`histogram_fixed_width_bins(...)`](https://www.tensorflow.org/api_docs/python/tf/histogram_fixed_width_bins.md.txt): Bins the given values for use in a histogram.

[`identity(...)`](https://www.tensorflow.org/api_docs/python/tf/identity.md.txt): Return a Tensor with the same shape and contents as input.

[`identity_n(...)`](https://www.tensorflow.org/api_docs/python/tf/identity_n.md.txt): Returns a list of tensors with the same shapes and contents as the input

[`ifftnd(...)`](https://www.tensorflow.org/api_docs/python/tf/ifftnd.md.txt): ND inverse fast Fourier transform.

[`import_graph_def(...)`](https://www.tensorflow.org/api_docs/python/tf/graph_util/import_graph_def.md.txt): Imports the graph from `graph_def` into the current default `Graph`. (deprecated arguments)

[`init_scope(...)`](https://www.tensorflow.org/api_docs/python/tf/init_scope.md.txt): A context manager that lifts ops out of control-flow scopes and function-building graphs.

[`inside_function(...)`](https://www.tensorflow.org/api_docs/python/tf/inside_function.md.txt): Indicates whether the caller code is executing inside a [`tf.function`](https://www.tensorflow.org/api_docs/python/tf/function.md.txt).

[`irfftnd(...)`](https://www.tensorflow.org/api_docs/python/tf/irfftnd.md.txt): ND inverse real fast Fourier transform.

[`is_symbolic_tensor(...)`](https://www.tensorflow.org/api_docs/python/tf/is_symbolic_tensor.md.txt): Test if `tensor` is a symbolic Tensor.

[`is_tensor(...)`](https://www.tensorflow.org/api_docs/python/tf/is_tensor.md.txt): Checks whether `x` is a TF-native type that can be passed to many TF ops.

[`less(...)`](https://www.tensorflow.org/api_docs/python/tf/math/less.md.txt): Returns the truth value of (x \< y) element-wise.

[`less_equal(...)`](https://www.tensorflow.org/api_docs/python/tf/math/less_equal.md.txt): Returns the truth value of (x \<= y) element-wise.

[`linspace(...)`](https://www.tensorflow.org/api_docs/python/tf/linspace.md.txt): Generates evenly-spaced values in an interval along a given axis.

[`load_library(...)`](https://www.tensorflow.org/api_docs/python/tf/load_library.md.txt): Loads a TensorFlow plugin.

[`load_op_library(...)`](https://www.tensorflow.org/api_docs/python/tf/load_op_library.md.txt): Loads a TensorFlow plugin, containing custom ops and kernels.

[`logical_and(...)`](https://www.tensorflow.org/api_docs/python/tf/math/logical_and.md.txt): Returns the truth value of x AND y element-wise.

[`logical_not(...)`](https://www.tensorflow.org/api_docs/python/tf/math/logical_not.md.txt): Returns the truth value of `NOT x` element-wise.

[`logical_or(...)`](https://www.tensorflow.org/api_docs/python/tf/math/logical_or.md.txt): Returns the truth value of x OR y element-wise.

[`make_ndarray(...)`](https://www.tensorflow.org/api_docs/python/tf/make_ndarray.md.txt): Create a numpy ndarray from a tensor.

[`make_tensor_proto(...)`](https://www.tensorflow.org/api_docs/python/tf/make_tensor_proto.md.txt): Create a TensorProto.

[`map_fn(...)`](https://www.tensorflow.org/api_docs/python/tf/map_fn.md.txt): Transforms `elems` by applying `fn` to each element unstacked on axis 0. (deprecated arguments)

[`matmul(...)`](https://www.tensorflow.org/api_docs/python/tf/linalg/matmul.md.txt): Multiplies matrix `a` by matrix `b`, producing `a` \* `b`.

[`matrix_square_root(...)`](https://www.tensorflow.org/api_docs/python/tf/linalg/sqrtm.md.txt): Computes the matrix square root of one or more square matrices:

[`maximum(...)`](https://www.tensorflow.org/api_docs/python/tf/math/maximum.md.txt): Returns the max of x and y (i.e. x \> y ? x : y) element-wise.

[`meshgrid(...)`](https://www.tensorflow.org/api_docs/python/tf/meshgrid.md.txt): Broadcasts parameters for evaluation on an N-D grid.

[`minimum(...)`](https://www.tensorflow.org/api_docs/python/tf/math/minimum.md.txt): Returns the min of x and y (i.e. x \< y ? x : y) element-wise.

[`multiply(...)`](https://www.tensorflow.org/api_docs/python/tf/math/multiply.md.txt): Returns an element-wise x \* y.

[`negative(...)`](https://www.tensorflow.org/api_docs/python/tf/math/negative.md.txt): Computes numerical negative value element-wise.

[`no_gradient(...)`](https://www.tensorflow.org/api_docs/python/tf/no_gradient.md.txt): Specifies that ops of type `op_type` is not differentiable.

[`no_op(...)`](https://www.tensorflow.org/api_docs/python/tf/no_op.md.txt): Does nothing. Only useful as a placeholder for control edges.

[`nondifferentiable_batch_function(...)`](https://www.tensorflow.org/api_docs/python/tf/nondifferentiable_batch_function.md.txt): Batches the computation done by the decorated function.

[`norm(...)`](https://www.tensorflow.org/api_docs/python/tf/norm.md.txt): Computes the norm of vectors, matrices, and tensors.

[`not_equal(...)`](https://www.tensorflow.org/api_docs/python/tf/math/not_equal.md.txt): Returns the truth value of (x != y) element-wise.

[`numpy_function(...)`](https://www.tensorflow.org/api_docs/python/tf/numpy_function.md.txt): Wraps a python function and uses it as a TensorFlow op.

[`one_hot(...)`](https://www.tensorflow.org/api_docs/python/tf/one_hot.md.txt): Returns a one-hot tensor.

[`ones(...)`](https://www.tensorflow.org/api_docs/python/tf/ones.md.txt): Creates a tensor with all elements set to one (1).

[`ones_like(...)`](https://www.tensorflow.org/api_docs/python/tf/ones_like.md.txt): Creates a tensor of all ones that has the same shape as the input.

[`pad(...)`](https://www.tensorflow.org/api_docs/python/tf/pad.md.txt): Pads a tensor.

[`parallel_stack(...)`](https://www.tensorflow.org/api_docs/python/tf/parallel_stack.md.txt): Stacks a list of rank-`R` tensors into one rank-`(R+1)` tensor in parallel.

[`pow(...)`](https://www.tensorflow.org/api_docs/python/tf/math/pow.md.txt): Computes the power of one value to another.

[`print(...)`](https://www.tensorflow.org/api_docs/python/tf/print.md.txt): Print the specified inputs.

[`py_function(...)`](https://www.tensorflow.org/api_docs/python/tf/py_function.md.txt): Wraps a python function into a TensorFlow op that executes it eagerly.

[`ragged_fill_empty_rows(...)`](https://www.tensorflow.org/api_docs/python/tf/ragged_fill_empty_rows.md.txt)

[`ragged_fill_empty_rows_grad(...)`](https://www.tensorflow.org/api_docs/python/tf/ragged_fill_empty_rows_grad.md.txt)

[`random_index_shuffle(...)`](https://www.tensorflow.org/api_docs/python/tf/random_index_shuffle.md.txt): Outputs the position of `value` in a permutation of \[0, ..., max_index\].

[`range(...)`](https://www.tensorflow.org/api_docs/python/tf/range.md.txt): Creates a sequence of numbers.

[`rank(...)`](https://www.tensorflow.org/api_docs/python/tf/rank.md.txt): Returns the rank of a tensor.

[`realdiv(...)`](https://www.tensorflow.org/api_docs/python/tf/realdiv.md.txt): Returns x / y element-wise for real types.

[`recompute_grad(...)`](https://www.tensorflow.org/api_docs/python/tf/recompute_grad.md.txt): Defines a function as a recompute-checkpoint for the tape auto-diff.

[`reduce_all(...)`](https://www.tensorflow.org/api_docs/python/tf/math/reduce_all.md.txt): Computes [`tf.math.logical_and`](https://www.tensorflow.org/api_docs/python/tf/math/logical_and.md.txt) of elements across dimensions of a tensor.

[`reduce_any(...)`](https://www.tensorflow.org/api_docs/python/tf/math/reduce_any.md.txt): Computes [`tf.math.logical_or`](https://www.tensorflow.org/api_docs/python/tf/math/logical_or.md.txt) of elements across dimensions of a tensor.

[`reduce_logsumexp(...)`](https://www.tensorflow.org/api_docs/python/tf/math/reduce_logsumexp.md.txt): Computes log(sum(exp(elements across dimensions of a tensor))).

[`reduce_max(...)`](https://www.tensorflow.org/api_docs/python/tf/math/reduce_max.md.txt): Computes [`tf.math.maximum`](https://www.tensorflow.org/api_docs/python/tf/math/maximum.md.txt) of elements across dimensions of a tensor.

[`reduce_mean(...)`](https://www.tensorflow.org/api_docs/python/tf/math/reduce_mean.md.txt): Computes the mean of elements across dimensions of a tensor.

[`reduce_min(...)`](https://www.tensorflow.org/api_docs/python/tf/math/reduce_min.md.txt): Computes the [`tf.math.minimum`](https://www.tensorflow.org/api_docs/python/tf/math/minimum.md.txt) of elements across dimensions of a tensor.

[`reduce_prod(...)`](https://www.tensorflow.org/api_docs/python/tf/math/reduce_prod.md.txt): Computes [`tf.math.multiply`](https://www.tensorflow.org/api_docs/python/tf/math/multiply.md.txt) of elements across dimensions of a tensor.

[`reduce_sum(...)`](https://www.tensorflow.org/api_docs/python/tf/math/reduce_sum.md.txt): Computes the sum of elements across dimensions of a tensor.

[`register_tensor_conversion_function(...)`](https://www.tensorflow.org/api_docs/python/tf/register_tensor_conversion_function.md.txt): Registers a function for converting objects of `base_type` to `Tensor`.

[`repeat(...)`](https://www.tensorflow.org/api_docs/python/tf/repeat.md.txt): Repeat elements of `input`.

[`required_space_to_batch_paddings(...)`](https://www.tensorflow.org/api_docs/python/tf/required_space_to_batch_paddings.md.txt): Calculate padding required to make block_shape divide input_shape.

[`reshape(...)`](https://www.tensorflow.org/api_docs/python/tf/reshape.md.txt): Reshapes a tensor.

[`reverse(...)`](https://www.tensorflow.org/api_docs/python/tf/reverse.md.txt): Reverses specific dimensions of a tensor.

[`reverse_sequence(...)`](https://www.tensorflow.org/api_docs/python/tf/reverse_sequence.md.txt): Reverses variable length slices.

[`rfftnd(...)`](https://www.tensorflow.org/api_docs/python/tf/rfftnd.md.txt): ND fast real Fourier transform.

[`roll(...)`](https://www.tensorflow.org/api_docs/python/tf/roll.md.txt): Rolls the elements of a tensor along an axis.

[`round(...)`](https://www.tensorflow.org/api_docs/python/tf/math/round.md.txt): Rounds the values of a tensor to the nearest integer, element-wise.

[`saturate_cast(...)`](https://www.tensorflow.org/api_docs/python/tf/dtypes/saturate_cast.md.txt): Performs a safe saturating cast of `value` to `dtype`.

[`scalar_mul(...)`](https://www.tensorflow.org/api_docs/python/tf/math/scalar_mul.md.txt): Multiplies a scalar times a `Tensor` or `IndexedSlices` object.

[`scan(...)`](https://www.tensorflow.org/api_docs/python/tf/scan.md.txt): scan on the list of tensors unpacked from `elems` on dimension 0. (deprecated argument values)

[`scatter_nd(...)`](https://www.tensorflow.org/api_docs/python/tf/scatter_nd.md.txt): Scatters `updates` into a tensor of shape `shape` according to `indices`.

[`searchsorted(...)`](https://www.tensorflow.org/api_docs/python/tf/searchsorted.md.txt): Searches for where a value would go in a sorted sequence.

[`sequence_mask(...)`](https://www.tensorflow.org/api_docs/python/tf/sequence_mask.md.txt): Returns a mask tensor representing the first N positions of each cell.

[`shape(...)`](https://www.tensorflow.org/api_docs/python/tf/shape.md.txt): Returns a tensor containing the shape of the input tensor.

[`shape_n(...)`](https://www.tensorflow.org/api_docs/python/tf/shape_n.md.txt): Returns shape of a list of tensors.

[`sigmoid(...)`](https://www.tensorflow.org/api_docs/python/tf/math/sigmoid.md.txt): Computes sigmoid of `x` element-wise.

[`sign(...)`](https://www.tensorflow.org/api_docs/python/tf/math/sign.md.txt): Returns an element-wise indication of the sign of a number.

[`sin(...)`](https://www.tensorflow.org/api_docs/python/tf/math/sin.md.txt): Computes sine of x element-wise.

[`sinh(...)`](https://www.tensorflow.org/api_docs/python/tf/math/sinh.md.txt): Computes hyperbolic sine of x element-wise.

[`size(...)`](https://www.tensorflow.org/api_docs/python/tf/size.md.txt): Returns the size of a tensor.

[`slice(...)`](https://www.tensorflow.org/api_docs/python/tf/slice.md.txt): Extracts a slice from a tensor.

[`sort(...)`](https://www.tensorflow.org/api_docs/python/tf/sort.md.txt): Sorts a tensor.

[`space_to_batch(...)`](https://www.tensorflow.org/api_docs/python/tf/space_to_batch.md.txt): SpaceToBatch for N-D tensors of type T.

[`space_to_batch_nd(...)`](https://www.tensorflow.org/api_docs/python/tf/space_to_batch_nd.md.txt): SpaceToBatch for N-D tensors of type T.

[`split(...)`](https://www.tensorflow.org/api_docs/python/tf/split.md.txt): Splits a tensor `value` into a list of sub tensors.

[`sqrt(...)`](https://www.tensorflow.org/api_docs/python/tf/math/sqrt.md.txt): Computes element-wise square root of the input tensor.

[`square(...)`](https://www.tensorflow.org/api_docs/python/tf/math/square.md.txt): Computes square of x element-wise.

[`squeeze(...)`](https://www.tensorflow.org/api_docs/python/tf/squeeze.md.txt): Removes dimensions of size 1 from the shape of a tensor.

[`stack(...)`](https://www.tensorflow.org/api_docs/python/tf/stack.md.txt): Stacks a list of rank-`R` tensors into one rank-`(R+1)` tensor.

[`stop_gradient(...)`](https://www.tensorflow.org/api_docs/python/tf/stop_gradient.md.txt): Stops gradient computation.

[`strided_slice(...)`](https://www.tensorflow.org/api_docs/python/tf/strided_slice.md.txt): Extracts a strided slice of a tensor (generalized Python array indexing).

[`subtract(...)`](https://www.tensorflow.org/api_docs/python/tf/math/subtract.md.txt): Returns x - y element-wise.

[`switch_case(...)`](https://www.tensorflow.org/api_docs/python/tf/switch_case.md.txt): Create a switch/case operation, i.e.

[`tan(...)`](https://www.tensorflow.org/api_docs/python/tf/math/tan.md.txt): Computes tan of x element-wise.

[`tanh(...)`](https://www.tensorflow.org/api_docs/python/tf/math/tanh.md.txt): Computes hyperbolic tangent of `x` element-wise.

[`tensor_scatter_nd_add(...)`](https://www.tensorflow.org/api_docs/python/tf/tensor_scatter_nd_add.md.txt): Adds sparse `updates` to an existing tensor according to `indices`.

[`tensor_scatter_nd_max(...)`](https://www.tensorflow.org/api_docs/python/tf/tensor_scatter_nd_max.md.txt): Apply a sparse update to a tensor taking the element-wise maximum.

[`tensor_scatter_nd_min(...)`](https://www.tensorflow.org/api_docs/python/tf/tensor_scatter_nd_min.md.txt)

[`tensor_scatter_nd_sub(...)`](https://www.tensorflow.org/api_docs/python/tf/tensor_scatter_nd_sub.md.txt): Subtracts sparse `updates` from an existing tensor according to `indices`.

[`tensor_scatter_nd_update(...)`](https://www.tensorflow.org/api_docs/python/tf/tensor_scatter_nd_update.md.txt): Scatter `updates` into an existing tensor according to `indices`.

[`tensordot(...)`](https://www.tensorflow.org/api_docs/python/tf/tensordot.md.txt): Tensor contraction of a and b along specified axes and outer product.

[`tile(...)`](https://www.tensorflow.org/api_docs/python/tf/tile.md.txt): Constructs a tensor by tiling a given tensor.

[`timestamp(...)`](https://www.tensorflow.org/api_docs/python/tf/timestamp.md.txt): Provides the time since epoch in seconds.

[`transpose(...)`](https://www.tensorflow.org/api_docs/python/tf/transpose.md.txt): Transposes `a`, where `a` is a Tensor.

[`truediv(...)`](https://www.tensorflow.org/api_docs/python/tf/math/truediv.md.txt): Divides x / y elementwise (using Python 3 division operator semantics).

[`truncatediv(...)`](https://www.tensorflow.org/api_docs/python/tf/truncatediv.md.txt): Returns x / y element-wise, rounded towards zero.

[`truncatemod(...)`](https://www.tensorflow.org/api_docs/python/tf/truncatemod.md.txt): Returns element-wise remainder of division.

[`tuple(...)`](https://www.tensorflow.org/api_docs/python/tf/tuple.md.txt): Groups tensors together.

[`type_spec_from_value(...)`](https://www.tensorflow.org/api_docs/python/tf/type_spec_from_value.md.txt): Returns a [`tf.TypeSpec`](https://www.tensorflow.org/api_docs/python/tf/TypeSpec.md.txt) that represents the given `value`.

[`unique(...)`](https://www.tensorflow.org/api_docs/python/tf/unique.md.txt): Finds unique elements in a 1-D tensor.

[`unique_with_counts(...)`](https://www.tensorflow.org/api_docs/python/tf/unique_with_counts.md.txt): Finds unique elements in a 1-D tensor.

[`unravel_index(...)`](https://www.tensorflow.org/api_docs/python/tf/unravel_index.md.txt): Converts an array of flat indices into a tuple of coordinate arrays.

[`unstack(...)`](https://www.tensorflow.org/api_docs/python/tf/unstack.md.txt): Unpacks the given dimension of a rank-`R` tensor into rank-`(R-1)` tensors.

[`variable_creator_scope(...)`](https://www.tensorflow.org/api_docs/python/tf/variable_creator_scope.md.txt): Scope which defines a variable creation function to be used by variable().

[`vectorized_map(...)`](https://www.tensorflow.org/api_docs/python/tf/vectorized_map.md.txt): Parallel map on the list of tensors unpacked from `elems` on dimension 0.

[`where(...)`](https://www.tensorflow.org/api_docs/python/tf/where.md.txt): Returns the indices of non-zero elements, or multiplexes `x` and `y`.

[`while_loop(...)`](https://www.tensorflow.org/api_docs/python/tf/while_loop.md.txt): Repeat `body` while the condition `cond` is true. (deprecated argument values)

[`zeros(...)`](https://www.tensorflow.org/api_docs/python/tf/zeros.md.txt): Creates a tensor with all elements set to zero.

[`zeros_like(...)`](https://www.tensorflow.org/api_docs/python/tf/zeros_like.md.txt): Creates a tensor with all elements set to zero.

<br />

<br />

<br />

| ## Other Members ||
|---|---|
| **version** | `'2.21.0'` |
| bfloat16 | Instance of [`tf.dtypes.DType`](https://www.tensorflow.org/api_docs/python/tf/dtypes/DType.md.txt) <br /> 16-bit bfloat (brain floating point). |
| bool | Instance of [`tf.dtypes.DType`](https://www.tensorflow.org/api_docs/python/tf/dtypes/DType.md.txt) <br /> Boolean. |
| complex128 | Instance of [`tf.dtypes.DType`](https://www.tensorflow.org/api_docs/python/tf/dtypes/DType.md.txt) <br /> 128-bit complex. |
| complex64 | Instance of [`tf.dtypes.DType`](https://www.tensorflow.org/api_docs/python/tf/dtypes/DType.md.txt) <br /> 64-bit complex. |
| double | Instance of [`tf.dtypes.DType`](https://www.tensorflow.org/api_docs/python/tf/dtypes/DType.md.txt) <br /> 64-bit (double precision) floating-point. |
| float16 | Instance of [`tf.dtypes.DType`](https://www.tensorflow.org/api_docs/python/tf/dtypes/DType.md.txt) <br /> 16-bit (half precision) floating-point. |
| float32 | Instance of [`tf.dtypes.DType`](https://www.tensorflow.org/api_docs/python/tf/dtypes/DType.md.txt) <br /> 32-bit (single precision) floating-point. |
| float64 | Instance of [`tf.dtypes.DType`](https://www.tensorflow.org/api_docs/python/tf/dtypes/DType.md.txt) <br /> 64-bit (double precision) floating-point. |
| half | Instance of [`tf.dtypes.DType`](https://www.tensorflow.org/api_docs/python/tf/dtypes/DType.md.txt) <br /> 16-bit (half precision) floating-point. |
| int16 | Instance of [`tf.dtypes.DType`](https://www.tensorflow.org/api_docs/python/tf/dtypes/DType.md.txt) <br /> Signed 16-bit integer. |
| int32 | Instance of [`tf.dtypes.DType`](https://www.tensorflow.org/api_docs/python/tf/dtypes/DType.md.txt) <br /> Signed 32-bit integer. |
| int64 | Instance of [`tf.dtypes.DType`](https://www.tensorflow.org/api_docs/python/tf/dtypes/DType.md.txt) <br /> Signed 64-bit integer. |
| int8 | Instance of [`tf.dtypes.DType`](https://www.tensorflow.org/api_docs/python/tf/dtypes/DType.md.txt) <br /> Signed 8-bit integer. |
| newaxis | `None` |
| qint16 | Instance of [`tf.dtypes.DType`](https://www.tensorflow.org/api_docs/python/tf/dtypes/DType.md.txt) <br /> Signed quantized 16-bit integer. |
| qint32 | Instance of [`tf.dtypes.DType`](https://www.tensorflow.org/api_docs/python/tf/dtypes/DType.md.txt) <br /> signed quantized 32-bit integer. |
| qint8 | Instance of [`tf.dtypes.DType`](https://www.tensorflow.org/api_docs/python/tf/dtypes/DType.md.txt) <br /> Signed quantized 8-bit integer. |
| quint16 | Instance of [`tf.dtypes.DType`](https://www.tensorflow.org/api_docs/python/tf/dtypes/DType.md.txt) <br /> Unsigned quantized 16-bit integer. |
| quint8 | Instance of [`tf.dtypes.DType`](https://www.tensorflow.org/api_docs/python/tf/dtypes/DType.md.txt) <br /> Unsigned quantized 8-bit integer. |
| resource | Instance of [`tf.dtypes.DType`](https://www.tensorflow.org/api_docs/python/tf/dtypes/DType.md.txt) <br /> Handle to a mutable, dynamically allocated resource. |
| string | Instance of [`tf.dtypes.DType`](https://www.tensorflow.org/api_docs/python/tf/dtypes/DType.md.txt) <br /> Variable-length string, represented as byte array. |
| uint16 | Instance of [`tf.dtypes.DType`](https://www.tensorflow.org/api_docs/python/tf/dtypes/DType.md.txt) <br /> Unsigned 16-bit (word) integer. |
| uint32 | Instance of [`tf.dtypes.DType`](https://www.tensorflow.org/api_docs/python/tf/dtypes/DType.md.txt) <br /> Unsigned 32-bit (dword) integer. |
| uint64 | Instance of [`tf.dtypes.DType`](https://www.tensorflow.org/api_docs/python/tf/dtypes/DType.md.txt) <br /> Unsigned 64-bit (qword) integer. |
| uint8 | Instance of [`tf.dtypes.DType`](https://www.tensorflow.org/api_docs/python/tf/dtypes/DType.md.txt) <br /> Unsigned 8-bit (byte) integer. |
| variant | Instance of [`tf.dtypes.DType`](https://www.tensorflow.org/api_docs/python/tf/dtypes/DType.md.txt) <br /> Data of arbitrary type (known at runtime). |

<br />