TensorFlow Core contains :

  1. 44 Modules
  2. 32 Classes
  3. 178 Functions and more are coming…

I am Paras, and I will be explaining to you every module, classes, and functions of TensorFlow. Here, I will be giving the links of my all posts where you can find the explanations. I am taking this structured content information from TensorFlow official documentation and later on, I will be explaining them. Let’s start…


  1. tf Module
  2. audio module: Public API for tf.audio namespace.
  3. autograph module: Conversion of plain Python into TensorFlow graph code.
  4. bitwise module: Operations for manipulating the binary representations of integers.
  5. compat module: Functions for Python 2 vs. 3 compatibility.
  6. config module: Public API for tf.config namespace.
  7. data module: tf.data.Dataset API for input pipelines.
  8. debugging module: Public API for tf.debugging namespace.
  9. distribute module: Library for running a computation across multiple devices.
  10. dtypes module: Public API for tf.dtypes namespace.
  11. errors module: Exception types for TensorFlow errors.
  12. estimator module: Estimator: High level tools for working with models.
  13. experimental module: Public API for tf.experimental namespace.
  14. feature_column module: Public API for tf.feature_column namespace.
  15. graph_util module: Helpers to manipulate a tensor graph in python.
  16. image module: Image processing and decoding ops.
  17. initializers module: Keras initializer serialization / deserialization.
  18. io module: Public API for tf.io namespace.
  19. keras module: Implementation of the Keras API meant to be a high-level API for TensorFlow.
  20. linalg module: Operations for linear algebra.
  21. lite module: Public API for tf.lite namespace.
  22. lookup module: Public API for tf.lookup namespace.
  23. losses module: Built-in loss functions.
  24. math module: Math Operations.
  25. metrics module: Built-in metrics.
  26. nest module: Public API for tf.nest namespace.
  27. nn module: Wrappers for primitive Neural Net (NN) Operations.
  28. optimizers module: Built-in optimizer classes.
  29. quantization module: Public API for tf.quantization namespace.
  30. queue module: Public API for tf.queue namespace.
  31. ragged module: Ragged Tensors.
  32. random module: Public API for tf.random namespace.
  33. raw_ops module: Public API for tf.raw_ops namespace.
  34. saved_model module: Public API for tf.saved_model namespace.
  35. sets module: Tensorflow set operations.
  36. signal module: Signal processing operations.
  37. sparse module: Sparse Tensor Representation.
  38. strings module: Operations for working with string Tensors.
  39. summary module: Operations for writing summary data, for use in analysis and visualization.
  40. sysconfig module: System configuration library.
  41. test module: Testing.
  42. tpu module: Ops related to Tensor Processing Units.
  43. train module: Support for training models.
  44. version module: Public API for tf.version namespace.
  45. xla module: Public API for tf.xla namespace.


  1. class AggregationMethod: A class listing aggregation methods used to combine gradients.
  2. class CriticalSection: Critical section.
  3. class DType: Represents the type of the elements in a Tensor.
  4. class DeviceSpec: Represents a (possibly partial) specification for a TensorFlow device.
  5. class GradientTape: Record operations for automatic differentiation.
  6. class Graph: A TensorFlow computation, represented as a dataflow graph.
  7. class IndexedSlices: A sparse representation of a set of tensor slices at given indices.
  8. class IndexedSlicesSpec: Type specification for a tf.IndexedSlices.
  9. class Module: Base neural network module class.
  10. class Operation: Represents a graph node that performs computation on tensors.
  11. class OptionalSpec: Represents an optional potentially containing a structured value.
  12. class RaggedTensor: Represents a ragged tensor.
  13. class RaggedTensorSpec: Type specification for a tf.RaggedTensor.
  14. class RegisterGradient: A decorator for registering the gradient function for an op type.
  15. class SparseTensor: Represents a sparse tensor.
  16. class SparseTensorSpec: Type specification for a tf.SparseTensor.
  17. class Tensor: Represents one of the outputs of an Operation.
  18. class TensorArray: Class wrapping dynamic-sized, per-time-step, write-once Tensor arrays.
  19. class TensorArraySpec: Type specification for a tf.TensorArray.
  20. class TensorShape: Represents the shape of a Tensor.
  21. class TensorSpec: Describes a tf.Tensor.
  22. class TypeSpec: Specifies a TensorFlow value type.
  23. class UnconnectedGradients: Controls how gradient computation behaves when y does not depend on x.
  24. class Variable: See the Variables Guide.
  25. class VariableAggregation: Indicates how a distributed variable will be aggregated.
  26. class VariableSynchronization: Indicates when a distributed variable will be synced.
  27. class constant_initializer: Initializer that generates tensors with constant values.
  28. class name_scope: A context manager for use when defining a Python op.
  29. class ones_initializer: Initializer that generates tensors initialized to 1.
  30. class random_normal_initializer: Initializer that generates tensors with a normal distribution.
  31. class random_uniform_initializer: Initializer that generates tensors with a uniform distribution.
  32. class zeros_initializer: Initializer that generates tensors initialized to 0.


  1. Assert(…): Asserts that the given condition is true.
  2. abs(…): Computes the absolute value of a tensor.
  3. acos(…): Computes acos of x element-wise.
  4. acosh(…): Computes inverse hyperbolic cosine of x element-wise.
  5. add(…): Returns x + y element-wise.
  6. add_n(…): Adds all input tensors element-wise.
  7. argmax(…): Returns the index with the largest value across axes of a tensor.
  8. argmin(…): Returns the index with the smallest value across axes of a tensor.
  9. argsort(…): Returns the indices of a tensor that give its sorted order along an axis.
  10. as_dtype(…): Converts the given type_value to a DType.
  11. as_string(…): Converts each entry in the given tensor to strings.
  12. asin(…): Computes the trignometric inverse sine of x element-wise.
  13. asinh(…): Computes inverse hyperbolic sine of x element-wise.
  14. assert_equal(…): Assert the condition x == y holds element-wise.
  15. assert_greater(…): Assert the condition x > y holds element-wise.
  16. assert_less(…): Assert the condition x < y holds element-wise.
  17. assert_rank(…): Assert that x has rank equal to rank.
  18. atan(…): Computes the trignometric inverse tangent of x element-wise.
  19. atan2(…): Computes arctangent of y/x element-wise, respecting signs of the arguments.
  20. atanh(…): Computes inverse hyperbolic tangent of x element-wise.
  21. batch_to_space(…): BatchToSpace for N-D tensors of type T.
  22. bitcast(…): Bitcasts a tensor from one type to another without copying data.
  23. boolean_mask(…): Apply boolean mask to tensor.
  24. broadcast_dynamic_shape(…): Computes the shape of a broadcast given symbolic shapes.
  25. broadcast_static_shape(…): Computes the shape of a broadcast given known shapes.
  26. broadcast_to(…): Broadcast an array for a compatible shape.
  27. case(…): Create a case operation.
  28. cast(…): Casts a tensor to a new type.
  29. clip_by_global_norm(…): Clips values of multiple tensors by the ratio of the sum of their norms.
  30. clip_by_norm(…): Clips tensor values to a maximum L2-norm.
  31. clip_by_value(…): Clips tensor values to a specified min and max.
  32. complex(…): Converts two real numbers to a complex number.
  33. concat(…): Concatenates tensors along one dimension.
  34. cond(…): Return true_fn() if the predicate pred is true else false_fn().
  35. constant(…): Creates a constant tensor.
  36. control_dependencies(…): Wrapper for Graph.control_dependencies() using the default graph.
  37. convert_to_tensor(…): Converts the given value to a Tensor.
  38. cos(…): Computes cos of x element-wise.
  39. cosh(…): Computes hyperbolic cosine of x element-wise.
  40. cumsum(…): Compute the cumulative sum of the tensor x along axis.
  41. custom_gradient(…): Decorator to define a function with a custom gradient.
  42. device(…): Specifies the device for ops created/executed in this context.
  43. divide(…): Computes Python style division of x by y.
  44. dynamic_partition(…): Partitions data into num_partitions tensors using indices from partitions.
  45. dynamic_stitch(…): Interleave the values from the data tensors into a single tensor.
  46. edit_distance(…): Computes the Levenshtein distance between sequences.
  47. einsum(…): A generalized contraction between tensors of arbitrary dimension.
  48. ensure_shape(…): Updates the shape of a tensor and checks at runtime that the shape holds.
  49. equal(…): Returns the truth value of (x == y) element-wise.
  50. executing_eagerly(…): Returns True if the current thread has eager execution enabled.
  51. exp(…): Computes exponential of x element-wise. y=ex
  52. expand_dims(…): Inserts a dimension of 1 into a tensor’s shape.
  53. extract_volume_patches(…): Extract patches from input and put them in the “depth” output dimension. 3D extension of extract_image_patches.
  54. eye(…): Construct an identity matrix, or a batch of matrices.
  55. fill(…): Creates a tensor filled with a scalar value.
  56. fingerprint(…): Generates fingerprint values.
  57. floor(…): Returns element-wise largest integer not greater than x.
  58. foldl(…): foldl on the list of tensors unpacked from elems on dimension 0.
  59. foldr(…): foldr on the list of tensors unpacked from elems on dimension 0.
  60. function(…): Creates a callable TensorFlow graph from a Python function.
  61. gather(…): Gather slices from params axis axis according to indices.
  62. gather_nd(…): Gather slices from params into a Tensor with shape specified by indices.
  63. get_logger(…): Return TF logger instance.
  64. get_static_value(…): Returns the constant value of the given tensor, if efficiently calculable.
  65. grad_pass_through(…): Creates a grad-pass-through op with the forward behavior provided in f.
  66. gradients(…): Constructs symbolic derivatives of sum of ys w.r.t. x in xs.
  67. greater(…): Returns the truth value of (x > y) element-wise.
  68. greater_equal(…): Returns the truth value of (x >= y) element-wise.
  69. group(…): Create an op that groups multiple operations.
  70. guarantee_const(…): Gives a guarantee to the TF runtime that the input tensor is a constant.
  71. hessians(…): Constructs the Hessian of sum of ys with respect to x in xs.
  72. histogram_fixed_width(…): Return histogram of values.
  73. histogram_fixed_width_bins(…): Bins the given values for use in a histogram.
  74. identity(…): Return a tensor with the same shape and contents as input.
  75. identity_n(…): Returns a list of tensors with the same shapes and contents as the input
  76. import_graph_def(…): Imports the graph from graph_def into the current default Graph. (deprecated arguments)
  77. init_scope(…): A context manager that lifts ops out of control-flow scopes and function-building graphs.
  78. is_tensor(…): Checks whether x is a tensor or “tensor-like”.
  79. less(…): Returns the truth value of (x < y) element-wise.
  80. less_equal(…): Returns the truth value of (x <= y) element-wise.
  81. linspace(…): Generates values in an interval.
  82. load_library(…): Loads a TensorFlow plugin.
  83. load_op_library(…): Loads a TensorFlow plugin, containing custom ops and kernels.
  84. logical_and(…): Returns the truth value of x AND y element-wise.
  85. logical_not(…): Returns the truth value of NOT x element-wise.
  86. logical_or(…): Returns the truth value of x OR y element-wise.
  87. make_ndarray(…): Create a numpy ndarray from a tensor.
  88. make_tensor_proto(…): Create a TensorProto.
  89. map_fn(…): map on the list of tensors unpacked from elems on dimension 0.
  90. matmul(…): Multiplies matrix a by matrix b, producing a * b.
  91. matrix_square_root(…): Computes the matrix square root of one or more square matrices:
  92. maximum(…): Returns the max of x and y (i.e. x > y ? x : y) element-wise.
  93. meshgrid(…): Broadcasts parameters for evaluation on an N-D grid.
  94. minimum(…): Returns the min of x and y (i.e. x < y ? x : y) element-wise.
  95. multiply(…): Returns x * y element-wise.
  96. negative(…): Computes numerical negative value element-wise.
  97. no_gradient(…): Specifies that ops of type op_type is not differentiable.
  98. no_op(…): Does nothing. Only useful as a placeholder for control edges.
  99. nondifferentiable_batch_function(…): Batches the computation done by the decorated function.
  100. norm(…): Computes the norm of vectors, matrices, and tensors.
  101. not_equal(…): Returns the truth value of (x != y) element-wise.
  102. numpy_function(…): Wraps a python function and uses it as a TensorFlow op.
  103. one_hot(…): Returns a one-hot tensor.
  104. ones(…): Creates a tensor with all elements set to 1.
  105. ones_like(…): Creates a tensor with all elements set to one.
  106. pad(…): Pads a tensor.
  107. parallel_stack(…): Stacks a list of rank-R tensors into one rank-(R+1) tensor in parallel.
  108. pow(…): Computes the power of one value to another.
  109. print(…): Print the specified inputs.
  110. py_function(…): Wraps a python function into a TensorFlow op that executes it eagerly.
  111. range(…): Creates a sequence of numbers.
  112. rank(…): Returns the rank of a tensor.
  113. realdiv(…): Returns x / y element-wise for real types.
  114. recompute_grad(…): An eager-compatible version of recompute_grad.
  115. reduce_all(…): Computes the “logical and” of elements across dimensions of a tensor.
  116. reduce_any(…): Computes the “logical or” of elements across dimensions of a tensor.
  117. reduce_logsumexp(…): Computes log(sum(exp(elements across dimensions of a tensor))).
  118. reduce_max(…): Computes the maximum of elements across dimensions of a tensor.
  119. reduce_mean(…): Computes the mean of elements across dimensions of a tensor.
  120. reduce_min(…): Computes the minimum of elements across dimensions of a tensor.
  121. reduce_prod(…): Computes the product of elements across dimensions of a tensor.
  122. reduce_sum(…): Computes the sum of elements across dimensions of a tensor.
  123. register_tensor_conversion_function(…): Registers a function for converting objects of base_type to Tensor.
  124. required_space_to_batch_paddings(…): Calculate padding required to make block_shape divide input_shape.
  125. reshape(…): Reshapes a tensor.
  126. reverse(…): Reverses specific dimensions of a tensor.
  127. reverse_sequence(…): Reverses variable length slices.
  128. roll(…): Rolls the elements of a tensor along an axis.
  129. round(…): Rounds the values of a tensor to the nearest integer, element-wise.
  130. saturate_cast(…): Performs a safe saturating cast of value to dtype.
  131. scalar_mul(…): Multiplies a scalar times a Tensor or IndexedSlices object.
  132. scan(…): scan on the list of tensors unpacked from elems on dimension 0.
  133. scatter_nd(…): Scatter updates into a new tensor according to indices.
  134. searchsorted(…): Searches input tensor for values on the innermost dimension.
  135. sequence_mask(…): Returns a mask tensor representing the first N positions of each cell.
  136. shape(…): Returns the shape of a tensor.
  137. shape_n(…): Returns shape of tensors.
  138. sigmoid(…): Computes sigmoid of x element-wise.
  139. sign(…): Returns an element-wise indication of the sign of a number.
  140. sin(…): Computes sine of x element-wise.
  141. sinh(…): Computes hyperbolic sine of x element-wise.
  142. size(…)
  143. slice(…): Extracts a slice from a tensor.
  144. sort(…): Sorts a tensor.
  145. space_to_batch(…): SpaceToBatch for N-D tensors of type T.
  146. space_to_batch_nd(…): SpaceToBatch for N-D tensors of type T.
  147. split(…): Splits a tensor into sub tensors.
  148. sqrt(…): Computes square root of x element-wise.
  149. square(…): Computes square of x element-wise.
  150. squeeze(…): Removes dimensions of size 1 from the shape of a tensor.
  151. stack(…): Stacks a list of rank-R tensors into one rank-(R+1) tensor.
  152. stop_gradient(…): Stops gradient computation.
  153. strided_slice(…): Extracts a strided slice of a tensor (generalized python array indexing).
  154. subtract(…): Returns x – y element-wise.
  155. switch_case(…): Create a switch/case operation, i.e. an integer-indexed conditional.
  156. tan(…): Computes tan of x element-wise.
  157. tanh(…): Computes hyperbolic tangent of x element-wise.
  158. tensor_scatter_nd_add(…): Adds sparse updates to an existing tensor according to indices.
  159. tensor_scatter_nd_sub(…): Subtracts sparse updates from an existing tensor according to indices.
  160. tensor_scatter_nd_update(…): Scatter updates into an existing tensor according to indices.
  161. tensordot(…): Tensor contraction of a and b along specified axes.
  162. tile(…): Constructs a tensor by tiling a given tensor.
  163. timestamp(…): Provides the time since epoch in seconds.
  164. transpose(…): Transposes a.
  165. truediv(…): Divides x / y elementwise (using Python 3 division operator semantics).
  166. truncatediv(…): Returns x / y element-wise for integer types.
  167. truncatemod(…): Returns element-wise remainder of division. This emulates C semantics in that
  168. tuple(…): Group tensors together.
  169. unique(…): Finds unique elements in a 1-D tensor.
  170. unique_with_counts(…): Finds unique elements in a 1-D tensor.
  171. unravel_index(…): Converts a flat index or array of flat indices into a tuple of
  172. unstack(…): Unpacks the given dimension of a rank-R tensor into rank-(R-1) tensors.
  173. variable_creator_scope(…): Scope which defines a variable creation function to be used by variable().
  174. vectorized_map(…): Parallel map on the list of tensors unpacked from elems on dimension 0.
  175. where(…): Return the elements, either from x or y, depending on the condition.
  176. while_loop(…): Repeat body while the condition cond is true.
  177. zeros(…): Creates a tensor with all elements set to zero.
  178. zeros_like(…): Creates a tensor with all elements set to zero.