Skip to main content
Install
Learn
Introduction
New to TensorFlow?
Tutorials
Learn how to use TensorFlow with end-to-end examples
Guide
Learn framework concepts and components
Learn ML
Educational resources to master your path with TensorFlow
API
TensorFlow (v2.16.1)
Versions…
TensorFlow.js
TensorFlow Lite
TFX
Ecosystem
LIBRARIES
TensorFlow.js
Develop web ML applications in JavaScript
TensorFlow Lite
Deploy ML on mobile, microcontrollers and other edge devices
TFX
Build production ML pipelines
All libraries
Create advanced models and extend TensorFlow
RESOURCES
Models & datasets
Pre-trained models and datasets built by Google and the community
Tools
Tools to support and accelerate TensorFlow workflows
Responsible AI
Resources for every stage of the ML workflow
Recommendation systems
Build recommendation systems with open source tools
Community
Groups
User groups, interest groups and mailing lists
Contribute
Guide for contributing to code and documentation
Blog
Stay up to date with all things TensorFlow
Forum
Discussion platform for the TensorFlow community
Why TensorFlow
About
Case studies
/
English
中文 – 简体
GitHub
TensorFlow v2.1.0
Overview
Python
C++
Java
Install
Learn
More
API
More
Overview
Python
C++
Java
Ecosystem
More
Community
More
Why TensorFlow
More
GitHub
Overview
All Symbols
Python v2.1.0
tf
Overview
AggregationMethod
argsort
batch_to_space
bitcast
boolean_mask
broadcast_dynamic_shape
broadcast_static_shape
broadcast_to
case
cast
clip_by_global_norm
clip_by_norm
clip_by_value
concat
cond
constant
constant_initializer
control_dependencies
convert_to_tensor
CriticalSection
custom_gradient
device
DeviceSpec
dynamic_partition
dynamic_stitch
edit_distance
eig
eigvals
einsum
ensure_shape
executing_eagerly
expand_dims
extract_volume_patches
eye
fill
fingerprint
foldl
foldr
function
gather
gather_nd
get_logger
get_static_value
gradients
GradientTape
grad_pass_through
Graph
group
guarantee_const
hessians
histogram_fixed_width
histogram_fixed_width_bins
identity
identity_n
IndexedSlices
IndexedSlicesSpec
init_scope
is_tensor
linspace
load_library
load_op_library
make_ndarray
make_tensor_proto
map_fn
meshgrid
Module
name_scope
nondifferentiable_batch_function
norm
no_gradient
no_op
numpy_function
ones
ones_initializer
ones_like
one_hot
Operation
OptionalSpec
pad
parallel_stack
print
py_function
RaggedTensor
RaggedTensorSpec
random_normal_initializer
random_uniform_initializer
range
rank
realdiv
recompute_grad
reduce_all
RegisterGradient
register_tensor_conversion_function
repeat
required_space_to_batch_paddings
reshape
reverse
reverse_sequence
roll
scan
scatter_nd
searchsorted
sequence_mask
shape
shape_n
size
slice
sort
space_to_batch
space_to_batch_nd
SparseTensorSpec
split
squeeze
stack
stop_gradient
strided_slice
switch_case
Tensor
TensorArray
TensorArraySpec
tensordot
TensorShape
TensorSpec
tensor_scatter_nd_add
tensor_scatter_nd_sub
tensor_scatter_nd_update
tile
timestamp
transpose
truncatediv
truncatemod
tuple
TypeSpec
UnconnectedGradients
unique
unique_with_counts
unravel_index
unstack
Variable
Variable.SaveSliceInfo
VariableAggregation
VariableSynchronization
variable_creator_scope
vectorized_map
where
while_loop
zeros
zeros_initializer
zeros_like
tf.audio
Overview
decode_wav
encode_wav
tf.autodiff
Overview
ForwardAccumulator
tf.autograph
Overview
set_verbosity
to_code
to_graph
trace
experimental
Overview
do_not_convert
Feature
tf.bitwise
Overview
bitwise_and
bitwise_or
bitwise_xor
invert
left_shift
right_shift
tf.compat
Overview
as_bytes
as_str_any
as_text
dimension_at_index
dimension_value
forward_compatibility_horizon
forward_compatible
path_to_str
v1
Overview
add_check_numerics_ops
add_to_collection
add_to_collections
all_variables
argmax
argmin
arg_max
arg_min
assert_equal
assert_greater
assert_greater_equal
assert_integer
assert_less
assert_less_equal
assert_near
assert_negative
assert_none_equal
assert_non_negative
assert_non_positive
assert_positive
assert_rank
assert_rank_at_least
assert_rank_in
assert_scalar
assert_type
assert_variables_initialized
assign
assign_add
assign_sub
AttrValue
AttrValue.ListValue
batch_gather
batch_scatter_update
batch_to_space
batch_to_space_nd
bincount
boolean_mask
case
clip_by_average_norm
colocate_with
cond
ConditionalAccumulator
ConditionalAccumulatorBase
ConfigProto
ConfigProto.DeviceCountEntry
ConfigProto.Experimental
confusion_matrix
constant
container
control_flow_v2_enabled
convert_to_tensor
convert_to_tensor_or_indexed_slices
convert_to_tensor_or_sparse_tensor
count_nonzero
count_up_to
create_partitioned_variables
decode_csv
decode_raw
delete_session_tensor
depth_to_space
device
DeviceSpec
Dimension
disable_control_flow_v2
disable_eager_execution
disable_resource_variables
disable_tensor_equality
disable_v2_behavior
disable_v2_tensorshape
enable_control_flow_v2
enable_eager_execution
enable_resource_variables
enable_tensor_equality
enable_v2_behavior
enable_v2_tensorshape
Event
executing_eagerly
expand_dims
extract_image_patches
FixedLengthRecordReader
fixed_size_partitioner
floor_div
gather
gather_nd
get_collection
get_collection_ref
get_default_graph
get_default_session
get_local_variable
get_seed
get_session_handle
get_session_tensor
get_variable
get_variable_scope
global_variables
global_variables_initializer
GPUOptions
GPUOptions.Experimental
GPUOptions.Experimental.VirtualDevices
gradients
GraphDef
GraphKeys
GraphOptions
hessians
HistogramProto
IdentityReader
initialize_all_tables
initialize_all_variables
initialize_local_variables
initialize_variables
InteractiveSession
is_variable_initialized
LMDBReader
load_file_system_library
local_variables
local_variables_initializer
LogMessage
make_template
MetaGraphDef
MetaGraphDef.CollectionDefEntry
MetaGraphDef.MetaInfoDef
MetaGraphDef.SignatureDefEntry
min_max_variable_partitioner
model_variables
moving_average_variables
multinomial
NameAttrList
NameAttrList.AttrEntry
NodeDef
NodeDef.AttrEntry
NodeDef.ExperimentalDebugInfo
norm
no_regularizer
ones_like
OptimizerOptions
op_scope
pad
parse_example
parse_single_example
placeholder
placeholder_with_default
Print
py_func
quantize_v2
random_normal_initializer
random_poisson
random_uniform_initializer
ReaderBase
reduce_all
reduce_any
reduce_join
reduce_logsumexp
reduce_max
reduce_mean
reduce_min
reduce_prod
reduce_sum
report_uninitialized_variables
reset_default_graph
resource_variables_enabled
reverse_sequence
RunMetadata
RunMetadata.FunctionGraphs
RunOptions
RunOptions.Experimental
scalar_mul
scatter_add
scatter_div
scatter_max
scatter_min
scatter_mul
scatter_nd_add
scatter_nd_sub
scatter_nd_update
scatter_sub
scatter_update
serialize_many_sparse
serialize_sparse
Session
SessionLog
setdiff1d
set_random_seed
shape
size
space_to_batch
space_to_depth
SparseConditionalAccumulator
SparseTensorValue
sparse_add
sparse_concat
sparse_matmul
sparse_merge
sparse_placeholder
sparse_reduce_max
sparse_reduce_max_sparse
sparse_reduce_sum
sparse_reduce_sum_sparse
sparse_segment_mean
sparse_segment_sqrt_n
sparse_segment_sum
sparse_split
sparse_to_dense
squeeze
string_split
string_to_hash_bucket
string_to_number
substr
Summary
Summary.Audio
Summary.Image
Summary.Value
SummaryMetadata
SummaryMetadata.PluginData
tables_initializer
TensorInfo
TensorInfo.CompositeTensor
TensorInfo.CooSparse
TextLineReader
TFRecordReader
to_bfloat16
to_complex128
to_complex64
to_double
to_float
to_int32
to_int64
trainable_variables
transpose
truncated_normal_initializer
tuple
uniform_unit_scaling_initializer
Variable
VariableAggregation
VariableScope
variables_initializer
variable_axis_size_partitioner
variable_creator_scope
variable_op_scope
variable_scope
verify_tensor_all_finite
where
while_loop
WholeFileReader
wrap_function
zeros_like
app
Overview
run
audio
Overview
autograph
Overview
to_code
to_graph
experimental
Overview
bitwise
Overview
compat
Overview
config
Overview
experimental
Overview
optimizer
Overview
threading
Overview
data
Overview
Dataset
FixedLengthRecordDataset
get_output_classes
get_output_shapes
get_output_types
Iterator
make_initializable_iterator
make_one_shot_iterator
TextLineDataset
TFRecordDataset
experimental
Overview
choose_from_datasets
Counter
CsvDataset
make_batched_features_dataset
make_csv_dataset
map_and_batch_with_legacy_function
RaggedTensorStructure
RandomDataset
sample_from_datasets
SparseTensorStructure
SqlDataset
StatsAggregator
TensorArrayStructure
TensorStructure
debugging
Overview
assert_shapes
experimental
Overview
distribute
Overview
get_loss_reduction
MirroredStrategy
OneDeviceStrategy
Strategy
StrategyExtended
cluster_resolver
Overview
experimental
Overview
CentralStorageStrategy
MultiWorkerMirroredStrategy
ParameterServerStrategy
TPUStrategy
distributions
Overview
Bernoulli
Beta
Categorical
Dirichlet
DirichletMultinomial
Distribution
Exponential
Gamma
kl_divergence
Laplace
Multinomial
Normal
RegisterKL
ReparameterizationType
StudentT
Uniform
dtypes
Overview
errors
Overview
error_code_from_exception_type
exception_type_from_error_code
raise_exception_on_not_ok_status
estimator
Overview
BaselineClassifier
BaselineEstimator
BaselineRegressor
classifier_parse_example_spec
DNNClassifier
DNNEstimator
DNNLinearCombinedClassifier
DNNLinearCombinedEstimator
DNNLinearCombinedRegressor
DNNRegressor
Estimator
LinearClassifier
LinearEstimator
LinearRegressor
regressor_parse_example_spec
experimental
Overview
dnn_logit_fn_builder
KMeans
linear_logit_fn_builder
export
Overview
inputs
Overview
numpy_input_fn
pandas_input_fn
tpu
Overview
InputPipelineConfig
RunConfig
TPUConfig
TPUEstimator
TPUEstimatorSpec
experimental
Overview
EmbeddingConfigSpec
experimental
Overview
output_all_intermediates
feature_column
Overview
categorical_column_with_vocabulary_file
input_layer
linear_model
make_parse_example_spec
shared_embedding_columns
flags
Overview
adopt_module_key_flags
ArgumentParser
ArgumentSerializer
BaseListParser
BooleanFlag
BooleanParser
CantOpenFlagFileError
CsvListSerializer
declare_key_flag
DEFINE
DEFINE_alias
DEFINE_bool
DEFINE_enum
DEFINE_enum_class
DEFINE_flag
DEFINE_float
DEFINE_integer
DEFINE_list
DEFINE_multi
DEFINE_multi_enum
DEFINE_multi_enum_class
DEFINE_multi_float
DEFINE_multi_integer
DEFINE_multi_string
DEFINE_spaceseplist
DEFINE_string
disclaim_key_flags
doc_to_help
DuplicateFlagError
EnumClassFlag
EnumClassParser
EnumFlag
EnumParser
Error
Flag
FlagHolder
FlagNameConflictsWithMethodError
FLAGS
FlagValues
flag_dict_to_args
FloatParser
get_help_width
IllegalFlagValueError
IntegerParser
ListParser
ListSerializer
mark_bool_flags_as_mutual_exclusive
mark_flags_as_mutual_exclusive
mark_flags_as_required
mark_flag_as_required
MultiEnumClassFlag
MultiFlag
multi_flags_validator
register_multi_flags_validator
register_validator
text_wrap
UnparsedFlagAccessError
UnrecognizedFlagError
ValidationError
validator
WhitespaceSeparatedListParser
tf_decorator
Overview
make_decorator
rewrap
TFDecorator
unwrap
tf_stack
Overview
CurrentModuleFilter
extract_stack
FrameSummary
StackSummary
StackTraceFilter
StackTraceMapper
StackTraceTransform
gfile
Overview
Copy
DeleteRecursively
Exists
FastGFile
Glob
IsDirectory
ListDirectory
MakeDirs
MkDir
Remove
Rename
Stat
Walk
graph_util
Overview
convert_variables_to_constants
extract_sub_graph
must_run_on_cpu
remove_training_nodes
tensor_shape_from_node_def_name
image
Overview
crop_and_resize
draw_bounding_boxes
extract_glimpse
resize
ResizeMethod
resize_area
resize_bicubic
resize_bilinear
resize_image_with_pad
resize_nearest_neighbor
sample_distorted_bounding_box
initializers
Overview
io
Overview
TFRecordCompressionType
tf_record_iterator
gfile
Overview
keras