Missed TensorFlow World? Check out the recap. Learn more

Module: tf

TensorFlow 2.0 version View source on GitHub

Modules

app module

audio module

autograph module

bitwise module

compat module

config module

contrib module: contrib module containing volatile or experimental code.

data module

debugging module

distribute module

distributions module

dtypes module

errors module

estimator module

experimental module

feature_column module

gfile module

graph_util module

image module

initializers module

io module

keras module

layers module

linalg module

lite module

logging module

lookup module

losses module

manip module

math module

metrics module

nest module

nn module

profiler module

python_io module

quantization module

queue module

ragged module

random module

raw_ops module

resource_loader module

saved_model module

sets module

signal module

sparse module

spectral module

strings module

summary module

sysconfig module

test module

tpu module

train module

user_ops module

version module

xla module

Classes

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

class AttrValue

class ConditionalAccumulator: A conditional accumulator for aggregating gradients.

class ConditionalAccumulatorBase: A conditional accumulator for aggregating gradients.

class ConfigProto

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 Dimension: Represents the value of one dimension in a TensorShape.

class Event

class FIFOQueue: A queue implementation that dequeues elements in first-in first-out order.

class FixedLenFeature: Configuration for parsing a fixed-length input feature.

class FixedLenSequenceFeature: Configuration for parsing a variable-length input feature into a Tensor.

class FixedLengthRecordReader: A Reader that outputs fixed-length records from a file.

class GPUOptions

class GradientTape: Record operations for automatic differentiation.

class Graph: A TensorFlow computation, represented as a dataflow graph.

class GraphDef

class GraphKeys: Standard names to use for graph collections.

class GraphOptions

class HistogramProto

class IdentityReader: A Reader that outputs the queued work as both the key and value.

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

class InteractiveSession: A TensorFlow Session for use in interactive contexts, such as a shell.

class LMDBReader: A Reader that outputs the records from a LMDB file.

class LogMessage

class MetaGraphDef

class Module: Base neural network module class.

class NameAttrList

class NodeDef

class OpError: A generic error that is raised when TensorFlow execution fails.

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

class OptimizerOptions

class PaddingFIFOQueue: A FIFOQueue that supports batching variable-sized tensors by padding.

class PriorityQueue: A queue implementation that dequeues elements in prioritized order.

class QueueBase: Base class for queue implementations.

class RaggedTensor: Represents a ragged tensor.

class RandomShuffleQueue: A queue implementation that dequeues elements in a random order.

class ReaderBase: Base class for different Reader types, that produce a record every step.

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

class RunMetadata

class RunOptions

class Session: A class for running TensorFlow operations.

class SessionLog

class SparseConditionalAccumulator: A conditional accumulator for aggregating sparse gradients.

class SparseFeature: Configuration for parsing a sparse input feature from an Example.

class SparseTensor: Represents a sparse tensor.

class SparseTensorValue: SparseTensorValue(indices, values, dense_shape)

class Summary

class SummaryMetadata

class TFRecordReader: A Reader that outputs the records from a TFRecords file.

class Tensor: Represents one of the outputs of an Operation.

class TensorArray: Class wrapping dynamic-sized, per-time-step, write-once Tensor arrays.

class TensorInfo

class TensorShape: Represents the shape of a Tensor.

class TensorSpec: Describes a tf.Tensor.

class TextLineReader: A Reader that outputs the lines of a file delimited by newlines.

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

class VarLenFeature: Configuration for parsing a variable-length input feature.

class Variable: See the Variables Guide.

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

class VariableScope: Variable scope object to carry defaults to provide to get_variable.

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

class WholeFileReader: A Reader that outputs the entire contents of a file as a value.

class constant_initializer: Initializer that generates tensors with constant values.

class glorot_normal_initializer: The Glorot normal initializer, also called Xavier normal initializer.

class glorot_uniform_initializer: The Glorot uniform initializer, also called Xavier uniform initializer.

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

class ones_initializer: Initializer that generates tensors initialized to 1.

class orthogonal_initializer: Initializer that generates an orthogonal matrix.

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 truncated_normal_initializer: Initializer that generates a truncated normal distribution.

class uniform_unit_scaling_initializer: Initializer that generates tensors without scaling variance.

class variable_scope: A context manager for defining ops that creates variables (layers).

class variance_scaling_initializer: Initializer capable of adapting its scale to the shape of weights tensors.

class zeros_initializer: Initializer that generates tensors initialized to 0.

Functions

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

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

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

Print(...): Prints a list of tensors. (deprecated)

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

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

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

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

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

add_check_numerics_ops(...): Connect a tf.debugging.check_numerics to every floating point tensor.

add_n(...): Adds all input tensors element-wise.

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

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

all_variables(...): Use tf.compat.v1.global_variables instead. (deprecated)

angle(...): Returns the element-wise argument of a complex (or real) tensor.

arg_max(...): Returns the index with the largest value across dimensions of a tensor. (deprecated)

arg_min(...): Returns the index with the smallest value across dimensions of a tensor. (deprecated)

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

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

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

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

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

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_greater_equal(...): Assert the condition x >= y holds element-wise.

assert_integer(...): Assert that x is of integer dtype.

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

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

assert_near(...): Assert the condition x and y are close element-wise.

assert_negative(...): Assert the condition x < 0 holds element-wise.

assert_non_negative(...): Assert the condition x >= 0 holds element-wise.

assert_non_positive(...): Assert the condition x <= 0 holds element-wise.

assert_none_equal(...): Assert the condition x != y holds for all elements.

assert_positive(...): Assert the condition x > 0 holds element-wise.

assert_proper_iterable(...): Static assert that values is a "proper" iterable.

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

assert_rank_at_least(...): Assert x has rank equal to rank or higher.

assert_rank_in(...): Assert x has rank in ranks.

assert_same_float_dtype(...): Validate and return float type based on tensors and dtype.

assert_scalar(...): Asserts that the given tensor is a scalar (i.e. zero-dimensional).

assert_type(...): Statically asserts that the given Tensor is of the specified type.

assert_variables_initialized(...): Returns an Op to check if variables are initialized.

assign(...): Update ref by assigning value to it.

assign_add(...): Update ref by adding value to it.

assign_sub(...): Update ref by subtracting value from it.

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