W3cubDocs

/TensorFlow Python

Module: tf

Module tf

Members

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

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

class AttrValue

Constant COMPILER_VERSION

class ConditionalAccumulator: A conditional accumulator for aggregating gradients.

class ConditionalAccumulatorBase: A conditional accumulator for aggregating gradients.

class ConfigProto

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 a dense input feature in a sequence item.

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

Constant GIT_VERSION

class GPUOptions

Constant GRAPH_DEF_VERSION

Constant GRAPH_DEF_VERSION_MIN_CONSUMER

Constant GRAPH_DEF_VERSION_MIN_PRODUCER

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 LogMessage

class NameAttrList

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

class NodeDef

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

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.

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

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

Constant QUANTIZED_DTYPES

class QueueBase: Base class for queue implementations.

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.

class SparseTensor: Represents a sparse tensor.

class SparseTensorValue: SparseTensorValue(indices, values, dense_shape)

class Summary

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 TextLineReader: A Reader that outputs the lines of a file delimited by newlines.

Constant VERSION

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

class Variable: See the Variables How To for a high

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

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

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

Constant absolute_import

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

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

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

add_check_numerics_ops(...): Connect a 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.

all_variables(...): See tf.global_variables. (deprecated)

app module: Generic entry point script.

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

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

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.

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 asin 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_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_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_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 atan of x element-wise.

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

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

betainc(...): Compute the regularized incomplete beta integral \(I_x(a, b)\).

Constant bfloat16

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

Constant bool

boolean_mask(...): Apply boolean mask to tensor. Numpy equivalent is tensor[mask].

broadcast_dynamic_shape(...): Returns the broadcasted dynamic shape between shape_x and shape_y.

broadcast_static_shape(...): Returns the broadcasted static shape between shape_x and shape_y.

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

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

ceil(...): Returns element-wise smallest integer in not less than x.

check_numerics(...): Checks a tensor for NaN and Inf values.

cholesky(...): Computes the Cholesky decomposition of one or more square matrices.

cholesky_solve(...): Solves systems of linear eqns A X = RHS, given Cholesky factorizations.

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

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.

compat module: Functions for Python 2 vs. 3 compatibility.

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

Constant complex128

Constant complex64

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

cond(...): Return either fn1() or fn2() based on the boolean predicate pred.

confusion_matrix(...): Computes the confusion matrix from predictions and labels.

conj(...): Returns the complex conjugate of a complex number.

constant(...): Creates a constant tensor.

class constant_initializer: Initializer that generates tensors with constant values.

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

contrib module: contrib module containing volatile or experimental code.

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

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

convert_to_tensor_or_indexed_slices(...): Converts the given object to a Tensor or an IndexedSlices.

convert_to_tensor_or_sparse_tensor(...): Converts value to a SparseTensor or Tensor.

core module

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

count_nonzero(...): Computes number of nonzero elements across dimensions of a tensor.

count_up_to(...): Increments 'ref' until it reaches 'limit'.

create_partitioned_variables(...): Create a list of partitioned variables according to the given slicing.

cross(...): Compute the pairwise cross product.

cumprod(...): Compute the cumulative product of the tensor x along axis.

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

decode_base64(...): Decode web-safe base64-encoded strings.

decode_csv(...): Convert CSV records to tensors. Each column maps to one tensor.

decode_json_example(...): Convert JSON-encoded Example records to binary protocol buffer strings.

decode_raw(...): Reinterpret the bytes of a string as a vector of numbers.

delete_session_tensor(...): Delete the tensor for the given tensor handle.

depth_to_space(...): DepthToSpace for tensors of type T.

dequantize(...): Dequantize the 'input' tensor into a float Tensor.

deserialize_many_sparse(...): Deserialize and concatenate SparseTensors from a serialized minibatch.

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

diag(...): Returns a diagonal tensor with a given diagonal values.

diag_part(...): Returns the diagonal part of the tensor.

digamma(...): Computes Psi, the derivative of Lgamma (the log of the absolute value of

div(...): Divides x / y elementwise (using Python 2 division operator semantics).

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

Constant division

Constant double

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.

einsum(...): A generalized contraction between tensors of arbitrary dimension.

encode_base64(...): Encode strings into web-safe base64 format.

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

erf(...): Computes the Gauss error function of x element-wise.

erfc(...): Computes the complementary error function of x element-wise.

errors module: Exception types for TensorFlow errors.

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

expand_dims(...): Inserts a dimension of 1 into a tensor's shape.

expm1(...): Computes exponential of x - 1 element-wise.

extract_image_patches(...): Extract patches from images and put them in the "depth" output dimension.

eye(...): Construct an identity matrix, or a batch of matrices.

fake_quant_with_min_max_args(...): Fake-quantize the 'inputs' tensor, type float to 'outputs' tensor of same type.

fake_quant_with_min_max_args_gradient(...): Compute gradients for a FakeQuantWithMinMaxArgs operation.

fake_quant_with_min_max_vars(...): Fake-quantize the 'inputs' tensor of type float and shape [b, h, w, d] via

fake_quant_with_min_max_vars_gradient(...): Compute gradients for a FakeQuantWithMinMaxVars operation.

fake_quant_with_min_max_vars_per_channel(...): Fake-quantize the 'inputs' tensor of type float and one of the shapes: [d],

fake_quant_with_min_max_vars_per_channel_gradient(...): Compute gradients for a FakeQuantWithMinMaxVarsPerChannel operation.

fft(...): Compute the 1-dimensional discrete Fourier Transform over the inner-most

fft2d(...): Compute the 2-dimensional discrete Fourier Transform over the inner-most

fft3d(...): Compute the 3-dimensional discrete Fourier Transform over the inner-most 3

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

fixed_size_partitioner(...): Partitioner to specify a fixed number of shards along given axis.

flags module: Implementation of the flags interface.

Constant float16

Constant float32

Constant float64

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

floor_div(...): Returns x // y element-wise.

floordiv(...): Divides x / y elementwise, rounding toward the most negative integer.

floormod(...): Returns element-wise remainder of division. When x < 0 xor y < 0 is

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

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

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

gather_nd(...): Gather values or slices from params according to indices.

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

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

get_default_graph(...): Returns the default graph for the current thread.

get_default_session(...): Returns the default session for the current thread.

get_local_variable(...): Gets an existing local variable or creates a new one.

get_seed(...): Returns the local seeds an operation should use given an op-specific seed.

get_session_handle(...): Return the handle of data.

get_session_tensor(...): Get the tensor of type dtype by feeding a tensor handle.

get_variable(...): Gets an existing variable with these parameters or create a new one.

get_variable_scope(...): Returns the current variable scope.

gfile module: Import router for file_io.

global_norm(...): Computes the global norm of multiple tensors.

global_variables(...): Returns global variables.

global_variables_initializer(...): Returns an Op that initializes global variables.

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

graph_util module: Helpers to manipulate a tensor graph in python.

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.

Constant half

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

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

identity(...): Return a tensor with the same shape and contents as the input tensor or value.

ifft(...): Compute the inverse 1-dimensional discrete Fourier Transform over the inner-most

ifft2d(...): Compute the inverse 2-dimensional discrete Fourier Transform over the inner-most

ifft3d(...): Compute the inverse 3-dimensional discrete Fourier Transform over the inner-most

igamma(...): Compute the lower regularized incomplete Gamma function Q(a, x).

igammac(...): Compute the upper regularized incomplete Gamma function Q(a, x).

imag(...): Returns the imaginary part of a complex number.

image module: Image processing and decoding ops. See the Images guide.

import_graph_def(...): Imports the TensorFlow graph in graph_def into the Python Graph.

initialize_all_tables(...): Returns an Op that initializes all tables of the default graph. (deprecated)

initialize_all_variables(...): See tf.global_variables_initializer. (deprecated)

initialize_local_variables(...): See tf.local_variables_initializer. (deprecated)

initialize_variables(...): See tf.variables_initializer. (deprecated)

Constant int16

Constant int32

Constant int64

Constant int8

invert_permutation(...): Computes the inverse permutation of a tensor.

is_finite(...): Returns which elements of x are finite.

is_inf(...): Returns which elements of x are Inf.

is_nan(...): Returns which elements of x are NaN.

is_non_decreasing(...): Returns True if x is non-decreasing.

is_numeric_tensor(...)

is_strictly_increasing(...): Returns True if x is strictly increasing.

is_variable_initialized(...): Tests if a variable has been initialized.

layers module: This library provides a set of high-level neural networks layers.

lbeta(...): Computes ln(|Beta(x)|), reducing along the last dimension.

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

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

lgamma(...): Computes the log of the absolute value of Gamma(x) element-wise.

lin_space(...): Generates values in an interval.

linspace(...): Generates values in an interval.

load_file_system_library(...): Loads a TensorFlow plugin, containing file system implementation.

load_op_library(...): Loads a TensorFlow plugin, containing custom ops and kernels.

local_variables(...): Returns local variables.

local_variables_initializer(...): Returns an Op that initializes all local variables.

log(...): Computes natural logarithm of x element-wise.

log1p(...): Computes natural logarithm of (1 + x) element-wise.

logging module: Logging utilities.

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.

logical_xor(...): x ^ y = (x | y) & ~(x & y).

losses module: Loss operations for use in neural networks.

make_template(...): Given an arbitrary function, wrap it so that it does variable sharing.

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

matching_files(...): Returns the set of files matching a pattern.

matmul(...): Multiplies matrix a by matrix b, producing a * b.

matrix_band_part(...): Copy a tensor setting everything outside a central band in each innermost matrix

matrix_determinant(...): Computes the determinant of one ore more square matrices.

matrix_diag(...): Returns a batched diagonal tensor with a given batched diagonal values.

matrix_diag_part(...): Returns the batched diagonal part of a batched tensor.

matrix_inverse(...): Computes the inverse of one or more square invertible matrices or their

matrix_set_diag(...): Returns a batched matrix tensor with new batched diagonal values.

matrix_solve(...): Solves systems of linear equations.

matrix_solve_ls(...): Solves one or more linear least-squares problems.

matrix_transpose(...): Transposes last two dimensions of tensor a.

matrix_triangular_solve(...): Solves systems of linear equations with upper or lower triangular matrices by

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.

metrics module: Evaluation-related metrics.

min_max_variable_partitioner(...): Partitioner to allocate minimum size per slice.

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

mod(...): Returns element-wise remainder of division. When x < 0 xor y < 0 is

model_variables(...): Returns all variables in the MODEL_VARIABLES collection.

moving_average_variables(...): Returns all variables that maintain their moving averages.

multinomial(...): Draws samples from a multinomial distribution.

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

name_scope(...): Returns a context manager for use when defining a Python op.

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

Constant newaxis

nn module: ## Neural network support. See the Neural Network guide.

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

no_regularizer(...): Use this function to prevent regularization of variables.

norm(...): Computes the norm of vectors, matrices, and tensors.

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

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

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

class ones_initializer: Initializer that generates tensors initialized to 1.

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

op_scope(...): DEPRECATED. Same as name_scope above, just different argument order.

class orthogonal_initializer: Initializer that generates an orthogonal matrix.

pad(...): Pads a tensor.

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

parse_example(...): Parses Example protos into a dict of tensors.

parse_single_example(...): Parses a single Example proto.

parse_single_sequence_example(...): Parses a single SequenceExample proto.

parse_tensor(...): Transforms a serialized tensorflow.TensorProto proto into a Tensor.

placeholder(...): Inserts a placeholder for a tensor that will be always fed.

placeholder_with_default(...): A placeholder op that passes through input when its output is not fed.

polygamma(...): Compute the polygamma function \(\psi^{(n)} (x)\).

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

Constant print_function

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

python module: Import core names of TensorFlow.

python_io module: Python functions for directly manipulating TFRecord-formatted files.

pywrap_tensorflow module

Constant qint16

Constant qint32

Constant qint8

qr(...): Computes the QR decompositions of one or more matrices.

quantize_v2(...): Quantize the 'input' tensor of type float to 'output' tensor of type 'T'.

quantized_concat(...): Concatenates quantized tensors along one dimension.

Constant quint16

Constant quint8

random_crop(...): Randomly crops a tensor to a given size.

random_gamma(...): Draws shape samples from each of the given Gamma distribution(s).

random_normal(...): Outputs random values from a normal distribution.

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

random_shuffle(...): Randomly shuffles a tensor along its first dimension.

random_uniform(...): Outputs random values from a uniform distribution.

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

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

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

read_file(...): Reads and outputs the entire contents of the input filename.

real(...): Returns the real part of a complex number.

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

reciprocal(...): Computes the reciprocal of x element-wise.

reduce_all(...): Computes the "logical and" of elements across dimensions of a tensor.

reduce_any(...): Computes the "logical or" of elements across dimensions of a tensor.

reduce_join(...): Joins a string Tensor across the given dimensions.

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

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

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

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

reduce_prod(...): Computes the product 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.

report_uninitialized_variables(...): Adds ops to list the names of uninitialized variables.

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

reset_default_graph(...): Clears the default graph stack and resets the global default graph.

reshape(...): Reshapes a tensor.

Constant resource

resource_loader module: Resource management library.

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

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

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

rint(...): Returns element-wise integer closest to x.

round(...): Rounds the values of a tensor to the nearest integer, element-wise.

rsqrt(...): Computes reciprocal of square root of x element-wise.

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

saved_model module: Convenience functions to save a model.

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

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

scatter_add(...): Adds sparse updates to a variable reference.

scatter_div(...): Divides a variable reference by sparse updates.

scatter_mul(...): Multiplies sparse updates into a variable reference.

scatter_nd(...): Creates a new tensor by applying sparse updates to individual

scatter_nd_add(...): Applies sparse addition between updates and individual values or slices

scatter_nd_sub(...): Applies sparse subtraction between updates and individual values or slices

scatter_nd_update(...): Applies sparse updates to individual values or slices within a given

scatter_sub(...): Subtracts sparse updates to a variable reference.

scatter_update(...): Applies sparse updates to a variable reference.

sdca module: A Dual Coordinate Ascent optimizer library for training fast linear models.

segment_max(...): Computes the maximum along segments of a tensor.

segment_mean(...): Computes the mean along segments of a tensor.

segment_min(...): Computes the minimum along segments of a tensor.

segment_prod(...): Computes the product along segments of a tensor.

segment_sum(...): Computes the sum along segments of a tensor.

self_adjoint_eig(...): Computes the eigen decomposition of a batch of self-adjoint matrices.

self_adjoint_eigvals(...): Computes the eigenvalues of one or more self-adjoint matrices.

sequence_mask(...): Return a mask tensor representing the first N positions of each row.

serialize_many_sparse(...): Serialize an N-minibatch SparseTensor into an [N, 3] string Tensor.

serialize_sparse(...): Serialize a SparseTensor into a string 3-vector (1-D Tensor) object.

set_random_seed(...): Sets the graph-level random seed.

setdiff1d(...): Computes the difference between two lists of numbers or strings.

sets module: Tensorflow set operations.

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

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

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

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

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

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

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

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

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

space_to_depth(...): SpaceToDepth for tensors of type T.

sparse_add(...): Adds two tensors, at least one of each is a SparseTensor.

sparse_concat(...): Concatenates a list of SparseTensor along the specified dimension.

sparse_fill_empty_rows(...): Fills empty rows in the input 2-D SparseTensor with a default value.

sparse_mask(...): Masks elements of IndexedSlices.

sparse_matmul(...): Multiply matrix "a" by matrix "b".

sparse_maximum(...): Returns the element-wise max of two SparseTensors.

sparse_merge(...): Combines a batch of feature ids and values into a single SparseTensor.

sparse_minimum(...): Returns the element-wise min of two SparseTensors.

sparse_placeholder(...): Inserts a placeholder for a sparse tensor that will be always fed.

sparse_reduce_sum(...): Computes the sum of elements across dimensions of a SparseTensor.

sparse_reduce_sum_sparse(...): Computes the sum of elements across dimensions of a SparseTensor.

sparse_reorder(...): Reorders a SparseTensor into the canonical, row-major ordering.

sparse_reset_shape(...): Resets the shape of a SparseTensor with indices and values unchanged.

sparse_reshape(...): Reshapes a SparseTensor to represent values in a new dense shape.

sparse_retain(...): Retains specified non-empty values within a SparseTensor.

sparse_segment_mean(...): Computes the mean along sparse segments of a tensor.

sparse_segment_sqrt_n(...): Computes the sum along sparse segments of a tensor divided by the sqrt of N.

sparse_segment_sum(...): Computes the sum along sparse segments of a tensor.

sparse_softmax(...): Applies softmax to a batched N-D SparseTensor.

sparse_split(...): Split a SparseTensor into num_split tensors along axis.

sparse_tensor_dense_matmul(...): Multiply SparseTensor (of rank 2) "A" by dense matrix "B".

sparse_tensor_to_dense(...): Converts a SparseTensor into a dense tensor.

sparse_to_dense(...): Converts a sparse representation into a dense tensor.

sparse_to_indicator(...): Converts a SparseTensor of ids into a dense bool indicator tensor.

sparse_transpose(...): Transposes a SparseTensor

split(...): Splits a tensor into sub tensors.

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

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

squared_difference(...): Returns (x - y)(x - y) 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 from a tensor.

Constant string

string_join(...): Joins the strings in the given list of string tensors into one tensor;

string_split(...): Split elements of source based on delimiter into a SparseTensor.

string_to_hash_bucket(...): Converts each string in the input Tensor to its hash mod by a number of buckets.

string_to_hash_bucket_fast(...): Converts each string in the input Tensor to its hash mod by a number of buckets.

string_to_hash_bucket_strong(...): Converts each string in the input Tensor to its hash mod by a number of buckets.

string_to_number(...): Converts each string in the input Tensor to the specified numeric type.

substr(...): Return substrings from Tensor of strings.

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

summary module: Tensor summaries for exporting information about a model.

svd(...): Computes the singular value decompositions of one or more matrices.

sysconfig module: System configuration library.

tables_initializer(...): Returns an Op that initializes all tables of the default graph.

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

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

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

test module: Testing. See the Testing guide.

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

to_bfloat16(...): Casts a tensor to type bfloat16.

to_double(...): Casts a tensor to type float64.

to_float(...): Casts a tensor to type float32.

to_int32(...): Casts a tensor to type int32.

to_int64(...): Casts a tensor to type int64.

tools module

trace(...): Compute the trace of a tensor x.

train module: Support for training models. See the Training guide.

trainable_variables(...): Returns all variables created with trainable=True.

transpose(...): Transposes a. Permutes the dimensions according to perm.

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

truncated_normal(...): Outputs random values from a truncated normal distribution.

class truncated_normal_initializer: Initializer that generates a truncated normal distribution.

truncatediv(...): Returns x / y element-wise for integer types.

truncatemod(...): Returns element-wise remainder of division. This emulates C semantics where

tuple(...): Group tensors together.

Constant uint16

Constant uint8

class uniform_unit_scaling_initializer: Initializer that generates tensors without scaling variance.

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

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

unsorted_segment_sum(...): Computes the sum along segments of a tensor.

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

user_ops module: All user ops.

variable_axis_size_partitioner(...): Get a partitioner for VariableScope to keep shards below max_shard_bytes.

variable_op_scope(...): Deprecated: context manager for defining an op that creates variables.

variable_scope(...): Returns a context manager for defining ops that creates variables (layers).

variables_initializer(...): Returns an Op that initializes a list of variables.

verify_tensor_all_finite(...): Assert that the tensor does not contain any NaN's or Inf's.

where(...): Return the elements, either from x or y, depending on the condition.

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

write_file(...): Writes contents to the file at input filename. Creates file if not existing.

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

class zeros_initializer: Initializer that generates tensors initialized to 0.

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

zeta(...): Compute the Hurwitz zeta function \(\zeta(x, q)\).

Defined in tensorflow/__init__.py.

© 2017 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/api_docs/python/tf