<> /* Styles inlined from /site-assets/css/.css */ /* override theme */ table img { max-width: 100%; } /* .devsite-terminal virtualenv prompt */ .tfo-terminal-venv::before { content: "(venv) $ " !important; } /* .devsite-terminal root prompt */ .tfo-terminal-root::before { content: "# " !important; } /* Used in links for type annotations in function/method signatures */ .tfo-signature-link a, .tfo-signature-link a:visited, .tfo-signature-link a:hover, .tfo-signature-link a:focus, .tfo-signature-link a:hover *, .tfo-signature-link a:focus * { text-decoration: none !important; } .tfo-signature-link a, .tfo-signature-link a:visited { border-bottom: 1px dotted #1a73e8; } .tfo-signature-link a:focus { border-bottom-: solid; } /* .devsite-terminal Windows prompt */ .tfo-terminal-windows::before { content: "C:\\> " !important; } /* .devsite-terminal Windows prompt w/ virtualenv */ .tfo-terminal-windows-venv::before { content: "(venv) C:\\> " !important; } .tfo-diff-green-one-level + * { background: rgba(175245162.6) !important; } .tfo-diff-green + * > * { background: rgba(175245162.6) !important; } .tfo-diff-green-list + ul > li:first-of-type { background: rgba(175245162.6) !important; } .tfo-diff-red-one-level + * { background: rgba(255230230.6) !important; text-decoration: line-through !important; } .tfo-diff-red + * > * { background: rgba(255230230.6) !important; text-decoration: line-through !important; } .tfo-diff-red-list + ul > li:first-of-type { background: rgba(255230230.6) !important; text-decoration: line-through !important; } devsite-code .tfo-notebook-code-cell-output { max-height: 300px; overflow: auto; background: rgba(2552472371); /* orange bg to distinguish from input code cells */ } devsite-code .tfo-notebook-code-cell-output + .devsite-code-buttons-container button { background: rgba(255247237.7); /* orange bg to distinguish from input code cells */ } devsite-code[dark-code] .tfo-notebook-code-cell-output { background: rgba(64781031); /* medium slate */ } devsite-code[dark-code] .tfo-notebook-code-cell-output + .devsite-code-buttons-container button { background: rgba(6478103.7); /* medium slate */ } /* override default table s for notebook buttons */ .devsite-table-wrapper .tfo-notebook-buttons { display: block; width: auto; } .tfo-notebook-buttons td { display: inline-block; padding: 0 16px 16px 0; } /* from DevSite's buttons.scss */ .tfo-notebook-buttons a, .tfo-notebook-buttons :link, .tfo-notebook-buttons :visited { -moz-appearance: none; -webkit-appearance: none; -webkit-box-align: center; -ms-flex-align: center; align-items: center; align-self: var(--devsite-button-align-self); background: var(--devsite-button-backgroundvar(--devsite-background-1)); border: var(--devsite-button-border0); border-radius: var(--devsite-button-border-radius2px); box-sizing: border-box; color: var(--devsite-button-color); cursor: pointer; display: -webkit-box; display: -ms-flexbox; display: flex; font: var(--devsite-button-font500 14px/36px var(--devsite-primary-font-family)); height: var(--devsite-button-height36px); letter-spacing: var(--devsite-button-letter-spacing0); line-height: var(--devsite-button-line-height36px); margin: var(--devsite-button-margin0); margin-inline-end: var(--devsite-button-margin-x-end); max-width: var(--devsite-button-max-widthnone); min-width: 36px; outline: 0; overflow: hidden; padding: var(--devsite-button-with-icon-padding0 16px); text-align: center; text-decoration: none; text-overflow: ellipsis; text-transform: var(--devsite-button-text-transformuppercase); transition: background-color .2s, border .2s; vertical-align: middle; white-space: nowrap; width: var(--devsite-button-widthauto); } .tfo-notebook-buttons a:hover, .tfo-notebook-buttons a:focus { background: var(--devsite-button-background-hover); border: var(--devsite-button-border-hover0); color: var(--devsite-button-color-hovervar(--devsite-button-color)); text-decoration: var(--devsite-button-text-decoration-hovernone); } .tfo-notebook-buttons a:active { background: var(--devsite-button-background-active); border: var(--devsite-button-border-active0); transform: var(--devsite-button-transform-activenone); } .tfo-notebook-buttons tr { background: 0; border: 0; } /* on rendered notebook page, remove link to webpage since we're already here */ .tfo-notebook-buttons:not(.tfo-api) td:first-child { display: none; } .tfo-notebook-buttons td > a > img { margin: 0 8px 0 -4px; height: 20px; } [appearance='dark'] .tfo-notebook-buttons td > a > img { filter: invert(1); } @media (prefers-color-scheme: dark) { [appearance='device'] .tfo-notebook-buttons td > a > img { filter: invert(1); } } /* landing pages */ .tfo-landing-row-item-inset-white { background-color: #fff; padding: 32px; } .tfo-landing-row-item-inset-white ol, .tfo-landing-row-item-inset-white ul { padding-left: 20px; } /* colab callout button */ .colab-callout-row devsite-code { border-radius: 8px 8px 0 0; box-shadow: none; } .colab-callout-footer { background: #e3e4e7; border-radius: 0 0 8px 8px; color: #37474f; padding: 20px; } .colab-callout-row devsite-code[dark-code] + .colab-callout-footer { background: #3f4f66; } .colab-callout-footer > .button { margin-top: 4px; color: #ff5c00; } .colab-callout-footer > a > span { vertical-align: middle; color: #37474f; padding-left: 10px; font-size: 14px; } .colab-callout-row devsite-code[dark-code] + .colab-callout-footer > a > span { color: #fff; } a.colab-button { background: rgba(255255255.75); border: solid 1px rgba(000.08); border-bottom-color: rgba(000.15); border-radius: 4px; color: #aaa; display: inline-block; font-size: 11px !important; font-weight: 300; line-height: 16px; padding: 4px 8px; text-decoration: none; text-transform: uppercase; } a.colab-button:hover { background: white; border-color: rgba(000.2); color: #666; } a.colab-button span { background: url(/images/colab_logo_button.svg) no-repeat 1px 1px / 20px; border-radius: 4px; display: inline-block; padding-left: 24px; text-decoration: none; } @media screen and (max-width: 600px) { .tfo-notebook-buttons td { display: block; } } /* guide and tutorials landing page cards and sections */ .tfo-landing-page-card { padding: 16px; box-shadow: 0 0 36px rgba(0,0,0,0.1); border-radius: 10px; } /* Page section headings */ .tfo-landing-page-heading h2h2.tfo-landing-page-heading { font-family: "Google Sans"sans-serif; color: #425066; font-size: 30px; font-weight: 700; line-height: 40px; } /* Item title headings */ .tfo-landing-page-heading h3h3.tfo-landing-page-heading, .tfo-landing-page-card h3h3.tfo-landing-page-card { font-family: "Google Sans"sans-serif; color: #425066; font-size: 20px; font-weight: 500; line-height: 26px; } /* List of tutorials notebooks for subsites */ .tfo-landing-page-resources-ul { padding-left: 15px } .tfo-landing-page-resources-ul > li { margin: 6px 0; } /* Temporary fix to hide product description in header on landing pages */ devsite-header .devsite-product-description { display: none; }

Module: tf

TensorFlow

pip install tensorflow

Modules

audio module: Public API for tf._api.v2.audio namespace

autodiff module: Public API for tf._api.v2.autodiff namespace

autograph module: Public API for tf._api.v2.autograph namespace

bitwise module: Public API for tf._api.v2.bitwise namespace

compat module: Public API for tf._api.v2.compat namespace

config module: Public API for tf._api.v2.config namespace

data module: Public API for tf._api.v2.data namespace

debugging module: Public API for tf._api.v2.debugging namespace

distribute module: Public API for tf._api.v2.distribute namespace

dtypes module: Public API for tf._api.v2.dtypes namespace

errors module: Public API for tf._api.v2.errors namespace

experimental module: Public API for tf._api.v2.experimental namespace

feature_column module: Public API for tf._api.v2.feature_column namespace

graph_util module: Public API for tf._api.v2.graph_util namespace

image module: Public API for tf._api.v2.image namespace

io module: Public API for tf._api.v2.io namespace

keras module: DO NOT EDIT.

linalg module: Public API for tf._api.v2.linalg namespace

lite module: Public API for tf._api.v2.lite namespace

lookup module: Public API for tf._api.v2.lookup namespace

math module: Public API for tf._api.v2.math namespace

mlir module: Public API for tf._api.v2.mlir namespace

nest module: Public API for tf._api.v2.nest namespace

nn module: Public API for tf._api.v2.nn namespace

profiler module: Public API for tf._api.v2.profiler namespace

quantization module: Public API for tf._api.v2.quantization namespace

queue module: Public API for tf._api.v2.queue namespace

ragged module: Public API for tf._api.v2.ragged namespace

random module: Public API for tf._api.v2.random namespace

raw_ops module: Public API for tf._api.v2.raw_ops namespace

saved_model module: Public API for tf._api.v2.saved_model namespace

sets module: Public API for tf._api.v2.sets namespace

signal module: Public API for tf._api.v2.signal namespace

sparse module: Public API for tf._api.v2.sparse namespace

strings module: Public API for tf._api.v2.strings namespace

summary module: Public API for tf._api.v2.summary namespace

sysconfig module: Public API for tf._api.v2.sysconfig namespace

test module: Public API for tf._api.v2.test namespace

tpu module: Public API for tf._api.v2.tpu namespace

train module: Public API for tf._api.v2.train namespace

types module: Public API for tf._api.v2.types namespace

version module: Public API for tf._api.v2.version namespace

xla module: Public API for tf._api.v2.xla namespace

Classes

class AggregationMethod: A class listing aggregation methods used to combine gradients.

class CriticalSection: Critical section.

class DType: Represents the type of the elements in a Tensor.

class DeviceSpec: Represents a (possibly partial) specification for a TensorFlow device.

class GradientTape: Record operations for automatic differentiation.

class Graph: A TensorFlow computationrepresented as a dataflow graph.

class IndexedSlices: A sparse representation of a set of tensor slices at given indices.

class IndexedSlicesSpec: Type specification for a tf.IndexedSlices.

class Module: Base neural network module class.

class Operation: Represents a graph node that performs computation on tensors.

class OptionalSpec: Type specification for tf.experimental.Optional.

class RaggedTensor: Represents a ragged tensor.

class RaggedTensorSpec: Type specification for a tf.RaggedTensor.

class RegisterGradient: A decorator for registering the gradient function for an op type.

class SparseTensor: Represents a sparse tensor.

class SparseTensorSpec: Type specification for a tf.sparse.SparseTensor.

class Tensor: A tf.Tensor represents a multidimensional array of elements.

class TensorArray: Class wrapping dynamic-sizedper-time-stepTensor arrays.

class TensorArraySpec: Type specification for a tf.TensorArray.

class TensorShape: Represents the shape of a Tensor.

class TensorSpec: Describes the type of a tf.Tensor.

class TypeSpec: Specifies a TensorFlow value type.

class UnconnectedGradients: Controls how gradient computation behaves when y does not depend on x.

class Variable: See the variable guide.

class VariableAggregation: Indicates how a distributed variable will be aggregated.

class VariableSynchronization: Indicates when a distributed variable will be synced.

class constant_initializer: Initializer that generates tensors with constant values.

class name_scope: A context manager for use when defining a Python op.

class ones_initializer: Initializer that generates tensors initialized to 1.

class random_normal_initializer: Initializer that generates tensors with a normal distribution.

class random_uniform_initializer: Initializer that generates tensors with a uniform distribution.

class zeros_initializer: Initializer that generates tensors initialized to 0.

Functions

Assert(...): Asserts that the given condition is true.

abs(...): Computes the absolute value of a tensor.

acos(...): Computes acos of x element-wise.

acosh(...): Computes inverse hyperbolic cosine of x element-wise.

add(...): Returns x + y element-wise.

add_n(...): Returns the element-wise sum of a list of tensors.

approx_top_k(...): Returns min/max k values and their indices of the input operand in an approximate manner.

argmax(...): Returns the index with the largest value across axes of a tensor.

argmin(...): Returns the index with the smallest value across axes of a tensor.

argsort(...): Returns the indices of a tensor that give its sorted order along an axis.

as_dtype(...): Converts the given type_value to a tf.DType.

as_string(...): Converts each entry in the given tensor to strings.

asin(...): Computes the trignometric inverse sine of x element-wise.

asinh(...): Computes inverse hyperbolic sine of x element-wise.

assert_equal(...): Assert the condition x == y holds element-wise.

assert_greater(...): Assert the condition x > y holds element-wise.

assert_less(...): Assert the condition x < y holds element-wise.

assert_rank(...): Assert that x has rank equal to rank.

atan(...): Computes the trignometric inverse tangent of x element-wise.

atan2(...): Computes arctangent of y/x element-wiserespecting signs of the arguments.

atanh(...): Computes inverse hyperbolic tangent of x element-wise.

batch_to_space(...): BatchToSpace for N-D tensors of type T.

bitcast(...): Bitcasts a tensor from one type to another without copying data.

boolean_mask(...): Apply boolean mask to tensor.

broadcast_dynamic_shape(...): Computes the shape of a broadcast given symbolic shapes.

broadcast_static_shape(...): Computes the shape of a broadcast given known shapes.

broadcast_to(...): Broadcast an array for a compatible shape.

case(...): Create a case operation.

cast(...): Casts a tensor to a new type.

clip_by_global_norm(...): Clips values of multiple tensors by the ratio of the sum of their norms.

clip_by_norm(...): Clips tensor values to a maximum L2-norm.

clip_by_value(...): Clips tensor values to a specified min and max.

complex(...): Converts two real numbers to a complex number.

concat(...): Concatenates tensors along one dimension.

cond(...): Return true_fn() if the predicate pred is true else false_fn().

constant(...): Creates a constant tensor from a tensor-like object.

control_dependencies(...): Wrapper for Graph.control_dependencies() using the default graph.

conv(...): Computes a N-D convolution given (N+1+batch_dims)-D input and (N+2)-D filter tensors.

conv2d_backprop_filter_v2(...): Computes the gradients of convolution with respect to the filter.

conv2d_backprop_input_v2(...): Computes the gradients of convolution with respect to the input.

convert_to_tensor(...): Converts the given value to a Tensor.

cos(...): Computes cos of x element-wise.

cosh(...): Computes hyperbolic cosine of x element-wise.

cumsum(...): Compute the cumulative sum of the tensor x along axis.

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

device(...): Specifies the device for ops created/executed in this context.

divide(...): Computes Python division of x by y.

dynamic_partition(...): Partitions data into num_partitions tensors using indices from partitions.

dynamic_stitch(...): Interleave the values from the data tensors into a single tensor.

edit_distance(...): Computes the Levenshtein distance between sequences.

eig(...): Computes the eigen decomposition of a batch of matrices.

eigvals(...): Computes the eigenvalues of one or more matrices.

einsum(...): Tensor contraction over specified indices and outer product.

ensure_shape(...): Updates the shape of a tensor and checks at runtime that the shape holds.

equal(...): Returns the truth value of (x == y) element-wise.

executing_eagerly(...): Checks whether the current thread has eager execution enabled.

exp(...): Computes exponential of x element-wise. \(y = e^x\).

expand_dims(...): Returns a tensor with a length 1 axis inserted at index axis.

extract_volume_patches(...): Extract patches from input and put them in the "depth" output dimension. 3D extension of extract_image_patches.

eye(...): Construct an identity matrixor a batch of matrices.

fftnd(...): ND fast Fourier transform.

fill(...): Creates a tensor filled with a scalar value.

fingerprint(...): Generates fingerprint values.

floor(...): Returns element-wise largest integer not greater than x.

foldl(...): foldl on the list of tensors unpacked from elems on dimension 0. (deprecated argument values)

foldr(...): foldr on the list of tensors unpacked from elems on dimension 0. (deprecated argument values)

function(...): Compiles a function into a callable TensorFlow graph. (deprecated arguments) (deprecated arguments) (deprecated arguments)

gather(...): Gather slices from params axis axis according to indices. (deprecated arguments)

gather_nd(...): Gather slices from params into a Tensor with shape specified by indices.

get_current_name_scope(...): Returns current full name scope specified by tf.name_scope(...)s.

get_logger(...): Return TF logger instance.

get_static_value(...): Returns the constant value of the given tensorif efficiently calculable.

grad_pass_through(...): Creates a grad-pass-through op with the forward behavior provided in f.

gradients(...): Constructs symbolic derivatives of sum of ys w.r.t. x in xs.

greater(...): Returns the truth value of (x > y) element-wise.

greater_equal(...): Returns the truth value of (x >= y) element-wise.

group(...): Create an op that groups multiple operations.

guarantee_const(...): Promise to the TF runtime that the input tensor is a constant. (deprecated)

hessians(...): Constructs the Hessian of sum of ys with respect to x in xs.

histogram_fixed_width(...): Return histogram of values.

histogram_fixed_width_bins(...): Bins the given values for use in a histogram.

identity(...): Return a Tensor with the same shape and contents as input.

identity_n(...): Returns a list of tensors with the same shapes and contents as the input

ifftnd(...): ND inverse fast Fourier transform.

import_graph_def(...): Imports the graph from graph_def into the current default Graph. (deprecated arguments)

init_scope(...): A context manager that lifts ops out of control-flow scopes and function-building graphs.

inside_function(...): Indicates whether the caller code is executing inside a tf.function.

irfftnd(...): ND inverse real fast Fourier transform.

is_symbolic_tensor(...): Test if tensor is a symbolic Tensor.

is_tensor(...): Checks whether x is a TF-native type that can be passed to many TF ops.

less(...): Returns the truth value of (x < y) element-wise.

less_equal(...): Returns the truth value of (x <= y) element-wise.

linspace(...): Generates evenly-spaced values in an interval along a given axis.

load_library(...): Loads a TensorFlow plugin.

load_op_library(...): Loads a TensorFlow plugincontaining custom ops and kernels.

logical_and(...): Returns the truth value of x AND y element-wise.

logical_not(...): Returns the truth value of NOT x element-wise.

logical_or(...): Returns the truth value of x OR y element-wise.

make_ndarray(...): Create a numpy ndarray from a tensor.

make_tensor_proto(...): Create a TensorProto.

map_fn(...): Transforms elems by applying fn to each element unstacked on axis 0. (deprecated arguments)

matmul(...): Multiplies matrix a by matrix bproducing a * b.

matrix_square_root(...): Computes the matrix square root of one or more square matrices:

maximum(...): Returns the max of x and y (i.e. x > y ? x : y) element-wise.

meshgrid(...): Broadcasts parameters for evaluation on an N-D grid.

minimum(...): Returns the min of x and y (i.e. x < y ? x : y) element-wise.

multiply(...): Returns an element-wise x * y.

negative(...): Computes numerical negative value element-wise.

no_gradient(...): Specifies that ops of type op_type is not differentiable.

no_op(...): Does nothing. Only useful as a placeholder for control edges.

nondifferentiable_batch_function(...): Batches the computation done by the decorated function.

norm(...): Computes the norm of vectorsmatricesand tensors.

not_equal(...): Returns the truth value of (x != y) element-wise.

numpy_function(...): Wraps a python function and uses it as a TensorFlow op.

one_hot(...): Returns a one-hot tensor.

ones(...): Creates a tensor with all elements set to one (1).

ones_like(...): Creates a tensor of all ones that has the same shape as the input.

pad(...): Pads a tensor.

parallel_stack(...): Stacks a list of rank-R tensors into one rank-(R+1) tensor in parallel.

pow(...): Computes the power of one value to another.

print(...): Print the specified inputs.

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

ragged_fill_empty_rows(...)

ragged_fill_empty_rows_grad(...)

random_index_shuffle(...): Outputs the position of value in a permutation of [0...max_index].

range(...): Creates a sequence of numbers.

rank(...): Returns the rank of a tensor.

realdiv(...): Returns x / y element-wise for real types.

recompute_grad(...): Defines a function as a recompute-checkpoint for the tape auto-diff.

reduce_all(...): Computes tf.math.logical_and of elements across dimensions of a tensor.

reduce_any(...): Computes tf.math.logical_or of elements across dimensions of a tensor.

reduce_logsumexp(...): Computes log(sum(exp(elements across dimensions of a tensor))).

reduce_max(...): Computes tf.math.maximum of elements across dimensions of a tensor.

reduce_mean(...): Computes the mean of elements across dimensions of a tensor.

reduce_min(...): Computes the tf.math.minimum of elements across dimensions of a tensor.

reduce_prod(...): Computes tf.math.multiply of elements across dimensions of a tensor.

reduce_sum(...): Computes the sum of elements across dimensions of a tensor.

register_tensor_conversion_function(...): Registers a function for converting objects of base_type to Tensor.

repeat(...): Repeat elements of input.

required_space_to_batch_paddings(...): Calculate padding required to make block_shape divide input_shape.

reshape(...): Reshapes a tensor.

reverse(...): Reverses specific dimensions of a tensor.

reverse_sequence(...): Reverses variable length slices.

rfftnd(...): ND fast real Fourier transform.

roll(...): Rolls the elements of a tensor along an axis.

round(...): Rounds the values of a tensor to the nearest integerelement-wise.

saturate_cast(...): Performs a safe saturating cast of value to dtype.

scalar_mul(...): Multiplies a scalar times a Tensor or IndexedSlices object.

scan(...): scan on the list of tensors unpacked from elems on dimension 0. (deprecated argument values)

scatter_nd(...): Scatters updates into a tensor of shape shape according to indices.

searchsorted(...): Searches for where a value would go in a sorted sequence.

sequence_mask(...): Returns a mask tensor representing the first N positions of each cell.

shape(...): Returns a tensor containing the shape of the input tensor.

shape_n(...): Returns shape of a list of tensors.

sigmoid(...): Computes sigmoid of x element-wise.

sign(...): Returns an element-wise indication of the sign of a number.

sin(...): Computes sine of x element-wise.

sinh(...): Computes hyperbolic sine of x element-wise.

size(...): Returns the size of a tensor.

slice(...): Extracts a slice from a tensor.

sort(...): Sorts a tensor.

space_to_batch(...): SpaceToBatch for N-D tensors of type T.

space_to_batch_nd(...): SpaceToBatch for N-D tensors of type T.

split(...): Splits a tensor value into a list of sub tensors.

sqrt(...): Computes element-wise square root of the input tensor.

square(...): Computes square of x element-wise.

squeeze(...): Removes dimensions of size 1 from the shape of a tensor.

stack(...): Stacks a list of rank-R tensors into one rank-(R+1) tensor.

stop_gradient(...): Stops gradient computation.

strided_slice(...): Extracts a strided slice of a tensor (generalized Python array indexing).

subtract(...): Returns x - y element-wise.

switch_case(...): Create a switch/case operationi.e.

tan(...): Computes tan of x element-wise.

tanh(...): Computes hyperbolic tangent of x element-wise.

tensor_scatter_nd_add(...): Adds sparse updates to an existing tensor according to indices.

tensor_scatter_nd_max(...): Apply a sparse update to a tensor taking the element-wise maximum.

tensor_scatter_nd_min(...)

tensor_scatter_nd_sub(...): Subtracts sparse updates from an existing tensor according to indices.

tensor_scatter_nd_update(...): Scatter updates into an existing tensor according to indices.

tensordot(...): Tensor contraction of a and b along specified axes and outer product.

tile(...): Constructs a tensor by tiling a given tensor.

timestamp(...): Provides the time since epoch in seconds.

transpose(...): Transposes awhere a is a Tensor.

truediv(...): Divides x / y elementwise (using Python 3 division operator semantics).

truncatediv(...): Returns x / y element-wiserounded towards zero.

truncatemod(...): Returns element-wise remainder of division.

tuple(...): Groups tensors together.

type_spec_from_value(...): Returns a tf.TypeSpec that represents the given value.

unique(...): Finds unique elements in a 1-D tensor.

unique_with_counts(...): Finds unique elements in a 1-D tensor.

unravel_index(...): Converts an array of flat indices into a tuple of coordinate arrays.

unstack(...): Unpacks the given dimension of a rank-R tensor into rank-(R-1) tensors.

variable_creator_scope(...): Scope which defines a variable creation function to be used by variable().

vectorized_map(...): Parallel map on the list of tensors unpacked from elems on dimension 0.

where(...): Returns the indices of non-zero elementsor multiplexes x and y.

while_loop(...): Repeat body while the condition cond is true. (deprecated argument values)

zeros(...): Creates a tensor with all elements set to zero.

zeros_like(...): Creates a tensor with all elements set to zero.

version '2.16.1'
bfloat16 Instance of tf.dtypes.DType

16-bit bfloat (brain floating point).

bool Instance of tf.dtypes.DType

Boolean.

complex128 Instance of tf.dtypes.DType

128-bit complex.

complex64 Instance of tf.dtypes.DType

64-bit complex.

double Instance of tf.dtypes.DType

64-bit (double precision) floating-point.

float16 Instance of tf.dtypes.DType

16-bit (half precision) floating-point.

float32 Instance of tf.dtypes.DType

32-bit (single precision) floating-point.

float64 Instance of tf.dtypes.DType

64-bit (double precision) floating-point.

half Instance of tf.dtypes.DType

16-bit (half precision) floating-point.

int16 Instance of tf.dtypes.DType

Signed 16-bit integer.

int32 Instance of tf.dtypes.DType

Signed 32-bit integer.

int64 Instance of tf.dtypes.DType

Signed 64-bit integer.

int8 Instance of tf.dtypes.DType

Signed 8-bit integer.

newaxis None
qint16 Instance of tf.dtypes.DType

Signed quantized 16-bit integer.

qint32 Instance of tf.dtypes.DType

signed quantized 32-bit integer.

qint8 Instance of tf.dtypes.DType

Signed quantized 8-bit integer.

quint16 Instance of tf.dtypes.DType

Unsigned quantized 16-bit integer.

quint8 Instance of tf.dtypes.DType

Unsigned quantized 8-bit integer.

resource Instance of tf.dtypes.DType

Handle to a mutabledynamically allocated resource.

string Instance of tf.dtypes.DType

Variable-length stringrepresented as byte array.

uint16 Instance of tf.dtypes.DType

Unsigned 16-bit (word) integer.

uint32 Instance of tf.dtypes.DType

Unsigned 32-bit (dword) integer.

uint64 Instance of tf.dtypes.DType

Unsigned 64-bit (qword) integer.

uint8 Instance of tf.dtypes.DType

Unsigned 8-bit (byte) integer.

variant Instance of tf.dtypes.DType

Data of arbitrary type (known at runtime).