Skip to main content
TensorFlow
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 Sign in
  • TensorFlow v2.16.1
Overview Python C++ Java More
TensorFlow
  • Install
  • Learn
    • More
  • API
    • More
    • Overview
    • Python
    • C++
    • Java
    • More
  • Ecosystem
    • More
  • Community
    • More
  • Why TensorFlow
    • More
  • GitHub
  • Overview
  • All Symbols
  • Python v2.16.1
  • tf
    • Overview
    • AggregationMethod
    • CriticalSection
    • DeviceSpec
    • GradientTape
    • Graph
    • IndexedSlices
    • IndexedSlicesSpec
    • Module
    • Operation
    • OptionalSpec
    • RaggedTensor
    • RaggedTensorSpec
    • RegisterGradient
    • SparseTensorSpec
    • Tensor
    • TensorArray
    • TensorArraySpec
    • TensorShape
    • TensorSpec
    • TypeSpec
    • UnconnectedGradients
    • Variable
    • Variable.SaveSliceInfo
    • VariableAggregation
    • VariableSynchronization
    • approx_top_k
    • 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
    • conv
    • conv2d_backprop_filter_v2
    • conv2d_backprop_input_v2
    • convert_to_tensor
    • custom_gradient
    • device
    • dynamic_partition
    • dynamic_stitch
    • edit_distance
    • einsum
    • ensure_shape
    • executing_eagerly
    • expand_dims
    • extract_volume_patches
    • eye
    • fftnd
    • fill
    • fingerprint
    • foldl
    • foldr
    • function
    • gather
    • gather_nd
    • get_current_name_scope
    • get_logger
    • get_static_value
    • grad_pass_through
    • gradients
    • group
    • guarantee_const
    • hessians
    • histogram_fixed_width
    • histogram_fixed_width_bins
    • identity
    • identity_n
    • ifftnd
    • init_scope
    • inside_function
    • irfftnd
    • is_symbolic_tensor
    • is_tensor
    • linspace
    • load_library
    • load_op_library
    • make_ndarray
    • make_tensor_proto
    • map_fn
    • meshgrid
    • name_scope
    • no_gradient
    • no_op
    • nondifferentiable_batch_function
    • norm
    • numpy_function
    • one_hot
    • ones
    • ones_initializer
    • ones_like
    • pad
    • parallel_stack
    • print
    • py_function
    • ragged_fill_empty_rows
    • ragged_fill_empty_rows_grad
    • random_index_shuffle
    • random_normal_initializer
    • random_uniform_initializer
    • range
    • rank
    • realdiv
    • recompute_grad
    • register_tensor_conversion_function
    • repeat
    • required_space_to_batch_paddings
    • reshape
    • reverse
    • reverse_sequence
    • rfftnd
    • roll
    • scan
    • scatter_nd
    • searchsorted
    • sequence_mask
    • shape
    • shape_n
    • size
    • slice
    • sort
    • space_to_batch
    • space_to_batch_nd
    • split
    • squeeze
    • stack
    • stop_gradient
    • strided_slice
    • switch_case
    • tensor_scatter_nd_add
    • tensor_scatter_nd_max
    • tensor_scatter_nd_min
    • tensor_scatter_nd_sub
    • tensor_scatter_nd_update
    • tensordot
    • tile
    • timestamp
    • transpose
    • truncatediv
    • truncatemod
    • tuple
    • type_spec_from_value
    • unique
    • unique_with_counts
    • unravel_index
    • unstack
    • 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
      • Feature
      • do_not_convert
      • set_loop_options
  • tf.bitwise
    • Overview
    • bitwise_and
    • bitwise_or
    • bitwise_xor
    • invert
    • left_shift
    • right_shift
  • tf.compat
    • Overview
    • as_bytes
    • as_str
    • as_str_any
    • as_text
    • dimension_at_index
    • dimension_value
    • forward_compatibility_horizon
    • forward_compatible
    • path_to_str
    • v1
      • Overview
      • AttrValue
      • AttrValue.ListValue
      • ConditionalAccumulator
      • ConditionalAccumulatorBase
      • ConfigProto
      • ConfigProto.DeviceCountEntry
      • ConfigProto.Experimental
      • DeviceSpec
      • Dimension
      • Event
      • FixedLengthRecordReader
      • GPUOptions
      • GPUOptions.Experimental
      • GPUOptions.Experimental.VirtualDevices
      • GraphDef
      • GraphKeys
      • GraphOptions
      • HistogramProto
      • IdentityReader
      • InteractiveSession
      • LMDBReader
      • LogMessage
      • MetaGraphDef
      • MetaGraphDef.CollectionDefEntry
      • MetaGraphDef.MetaInfoDef
      • MetaGraphDef.MetaInfoDef.FunctionAliasesEntry
      • MetaGraphDef.SignatureDefEntry
      • NameAttrList
      • NameAttrList.AttrEntry
      • NodeDef
      • NodeDef.AttrEntry
      • NodeDef.ExperimentalDebugInfo
      • OptimizerOptions
      • Print
      • ReaderBase
      • RunMetadata
      • RunMetadata.FunctionGraphs
      • RunOptions
      • RunOptions.Experimental
      • RunOptions.Experimental.RunHandlerPoolOptions
      • Session
      • SessionLog
      • SparseConditionalAccumulator
      • SparseTensorValue
      • Summary
      • Summary.Audio
      • Summary.Image
      • Summary.Value
      • SummaryMetadata
      • SummaryMetadata.PluginData
      • TFRecordReader
      • TensorInfo
      • TensorInfo.CompositeTensor
      • TensorInfo.CooSparse
      • TextLineReader
      • Variable
      • VariableAggregation
      • VariableScope
      • WholeFileReader
      • add_check_numerics_ops
      • add_to_collection
      • add_to_collections
      • all_variables
      • arg_max
      • arg_min
      • argmax
      • argmin
      • assert_equal
      • assert_greater
      • assert_greater_equal
      • assert_integer
      • assert_less
      • assert_less_equal
      • assert_near
      • assert_negative
      • assert_non_negative
      • assert_non_positive
      • assert_none_equal
      • assert_positive
      • assert_rank
      • assert_rank_at_least
      • assert_rank_in
      • assert_scalar
      • assert_type
      • assert_variables_initialized
      • assign
      • assign_add
      • assign_sub
      • batch_gather
      • batch_scatter_update
      • batch_to_space
      • batch_to_space_nd
      • bincount
      • boolean_mask
      • case
      • clip_by_average_norm
      • colocate_with
      • cond
      • confusion_matrix
      • constant
      • constant_initializer
      • 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
      • disable_control_flow_v2
      • disable_eager_execution
      • disable_resource_variables
      • disable_tensor_equality
      • disable_v2_behavior
      • disable_v2_tensorshape
      • div
      • enable_control_flow_v2
      • enable_eager_execution
      • enable_resource_variables
      • enable_tensor_equality
      • enable_v2_behavior
      • enable_v2_tensorshape
      • executing_eagerly
      • executing_eagerly_outside_functions
      • expand_dims
      • extract_image_patches
      • fixed_size_partitioner
      • floor_div
      • foldl
      • foldr
      • 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
      • glorot_normal_initializer
      • glorot_uniform_initializer
      • gradients
      • hessians
      • initialize_all_tables
      • initialize_all_variables
      • initialize_local_variables
      • initialize_variables
      • is_variable_initialized
      • load_file_system_library
      • local_variables
      • local_variables_initializer
      • make_template
      • map_fn
      • min_max_variable_partitioner
      • model_variables
      • moving_average_variables
      • multinomial
      • name_scope
      • no_regularizer
      • norm
      • ones_initializer
      • ones_like
      • op_scope
      • orthogonal_initializer
      • pad
      • parse_example
      • parse_single_example
      • placeholder
      • placeholder_with_default
      • py_func
      • quantize_v2
      • random_normal_initializer
      • random_poisson
      • random_uniform_initializer
      • 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
      • scalar_mul
      • scan
      • scatter_add
      • scatter_div
      • scatter_max
      • scatter_min
      • scatter_mul
      • scatter_nd_add
      • scatter_nd_sub
      • scatter_nd_update