Returns the shape of a tensor.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.Shape
This operation returns a 1-D integer tensor representing the shape of input.


Returns shape of tensors.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ShapeN
This operation returns N 1-D integer tensors representing shape of input[i]s.


Creates a Dataset that includes only 1/num_shards of this dataset.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ShardDataset


Generate a sharded filename. The filename is printf formatted as
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ShardedFilename
%s-%05d-of-%05d, basename, shard, num_shards.


Generate a glob pattern matching all sharded file names.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ShardedFilespec


Creates a dataset that shuffles and repeats elements from input_dataset
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ShuffleAndRepeatDataset
pseudorandomly.


Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ShuffleAndRepeatDatasetV2


Creates a dataset that shuffles elements from input_dataset pseudorandomly.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ShuffleDataset


Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ShuffleDatasetV2


Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ShuffleDatasetV3


Shuts down a running distributed TPU system.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ShutdownDistributedTPU
The op returns an error if no system is running.


Computes sigmoid of x element-wise.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.Sigmoid
Specifically, y = 1 / (1 + exp(-x)).


Computes the gradient of the sigmoid of x wrt its input.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SigmoidGrad
Specifically, grad = dy * y * (1 - y), where y = sigmoid(x), and dy is the corresponding input gradient.


Returns an element-wise indication of the sign of a number.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.Sign
y = sign(x) = -1 if x < 0; 0 if x == 0; 1 if x > 0.
For complex numbers, y = sign(x) = x / |x| if x != 0, otherwise y = 0.


Computes sine of x element-wise.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.Sin
Given an input tensor, this function computes sine of every element in the tensor. Input range is (-inf, inf) and output range is [-1,1].


Computes hyperbolic sine of x element-wise.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.Sinh
Given an input tensor, this function computes hyperbolic sine of every element in the tensor. Input range is [-inf,inf] and output range is [-inf,inf].


Returns the size of a tensor.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.Size
This operation returns an integer representing the number of elements in input.


Creates a dataset that skips count elements from the input_dataset.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SkipDataset


Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SleepDataset


Return a slice from 'input'.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.Slice
The output tensor is a tensor with dimensions described by 'size' whose values are extracted from 'input' starting at the offsets in 'begin'.
Requirements: 0 <= begin[i] <= begin[i] + size[i] <= Di for i in [0, n)


Creates a dataset that passes a sliding window over input_dataset.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SlidingWindowDataset


Returns a copy of the input tensor.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.Snapshot


Creates a dataset that will write to / read from a snapshot.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SnapshotDataset
This dataset attempts to determine whether a valid snapshot exists at the snapshot_path, and reads from the snapshot in lieu of using input_dataset. If not, it will run the preprocessing pipeline as usual, and write out a snapshot of the data processed for future use.


Creates a dataset that will write to / read from a snapshot.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SnapshotDatasetV2
This dataset attempts to determine whether a valid snapshot exists at the snapshot_path, and reads from the snapshot in lieu of using input_dataset. If not, it will run the preprocessing pipeline as usual, and write out a snapshot of the data processed for future use.


Generates points from the Sobol sequence.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SobolSample
Creates a Sobol sequence with num_results samples. Each sample has dimension dim. Skips the first skip samples.


Computes softmax activations.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.Softmax
For each batch i and class j we have


Computes softmax cross entropy cost and gradients to backpropagate.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SoftmaxCrossEntropyWithLogits
Inputs are the logits, not probabilities.


Computes softplus: log(exp(features) + 1).
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.Softplus


Computes softplus gradients for a softplus operation.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SoftplusGrad


Computes softsign: features / (abs(features) + 1).
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.Softsign


Computes softsign gradients for a softsign operation.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SoftsignGrad


SpaceToBatch for 4-D tensors of type T.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SpaceToBatch
This is a legacy version of the more general SpaceToBatchND.
Zero-pads and then rearranges (permutes) blocks of spatial data into batch. More specifically, this op outputs a copy of the input tensor where values from the height and width dimensions are moved to the batch dimension. After the zero-padding, both height and width of the input must be divisible by the block size.
paddings = [[pad_top, pad_bottom], [pad_left, pad_right]]
The effective spatial dimensions of the zero-padded input tensor will be:
height_pad = pad_top + height + pad_bottom width_pad = pad_left + width + pad_right
The attr block_size must be greater than one. It indicates the block size.
The shape of the output will be:
[batchblock_sizeblock_size, height_pad/block_size, width_pad/block_size, depth]
Some examples:
(1) For the following input of shape [1, 2, 2, 1] and block_size of 2:
The output tensor has shape [4, 1, 1, 1] and value:
(2) For the following input of shape [1, 2, 2, 3] and block_size of 2:
The output tensor has shape [4, 1, 1, 3] and value:
(3) For the following input of shape [1, 4, 4, 1] and block_size of 2:
The output tensor has shape [4, 2, 2, 1] and value:
(4) For the following input of shape [2, 2, 4, 1] and block_size of 2:
The output tensor has shape [8, 1, 2, 1] and value:
Among others, this operation is useful for reducing atrous convolution into regular convolution.


SpaceToBatch for N-D tensors of type T.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SpaceToBatchND
This operation divides "spatial" dimensions [1, ..., M] of the input into a grid of blocks of shape block_shape, and interleaves these blocks with the "batch" dimension (0) such that in the output, the spatial dimensions [1, ..., M] correspond to the position within the grid, and the batch dimension combines both the position within a spatial block and the original batch position. Prior to division into blocks, the spatial dimensions of the input are optionally zero padded according to paddings. See below for a precise description.
This operation is equivalent to the following steps:
Zero-pad the start and end of dimensions [1, ..., M] of the input according to paddings to produce padded of shape padded_shape.
Reshape padded to reshaped_padded of shape:
[batch] + [padded_shape[1] / block_shape[0], block_shape[0], ..., padded_shape[M] / block_shape[M-1], block_shape[M-1]] + remaining_shape
block_shape + [batch] + [padded_shape[1] / block_shape[0], ..., padded_shape[M] / block_shape[M-1]] + remaining_shape
[batch * prod(block_shape)] + [padded_shape[1] / block_shape[0], ..., padded_shape[M] / block_shape[M-1]] + remaining_shape
Some examples:
(1) For the following input of shape [1, 2, 2, 1], block_shape = [2, 2], and paddings = [[0, 0], [0, 0]]:
The output tensor has shape [4, 1, 1, 1] and value:
(2) For the following input of shape [1, 2, 2, 3], block_shape = [2, 2], and paddings = [[0, 0], [0, 0]]:
The output tensor has shape [4, 1, 1, 3] and value:
(3) For the following input of shape [1, 4, 4, 1], block_shape = [2, 2], and paddings = [[0, 0], [0, 0]]:
The output tensor has shape [4, 2, 2, 1] and value:
(4) For the following input of shape [2, 2, 4, 1], block_shape = [2, 2], and paddings = [[0, 0], [2, 0]]:
The output tensor has shape [8, 1, 3, 1] and value:
Among others, this operation is useful for reducing atrous convolution into regular convolution.


SpaceToDepth for tensors of type T.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SpaceToDepth
Rearranges blocks of spatial data, into depth. More specifically, this op outputs a copy of the input tensor where values from the height and width dimensions are moved to the depth dimension. The attr block_size indicates the input block size.
The data_format attr specifies the layout of the input and output tensors with the following options: "NHWC": [ batch, height, width, channels ] "NCHW": [ batch, channels, height, width ] "NCHW_VECT_C": qint8 [ batch, channels / 4, height, width, 4 ]
It is useful to consider the operation as transforming a 6-D Tensor. e.g. for data_format = NHWC, Each element in the input tensor can be specified via 6 coordinates, ordered by decreasing memory layout significance as: n,oY,bY,oX,bX,iC (where n=batch index, oX, oY means X or Y coordinates within the output image, bX, bY means coordinates within the input block, iC means input channels). The output would be a transpose to the following layout: n,oY,oX,bY,bX,iC
This operation is useful for resizing the activations between convolutions (but keeping all data), e.g. instead of pooling. It is also useful for training purely convolutional models.
For example, given an input of shape [1, 2, 2, 1], data_format = "NHWC" and block_size = 2:
This operation will output a tensor of shape [1, 1, 1, 4]:
Here, the input has a batch of 1 and each batch element has shape [2, 2, 1], the corresponding output will have a single element (i.e. width and height are both 1) and will have a depth of 4 channels (1 * block_size * block_size). The output element shape is [1, 1, 4].
For an input tensor with larger depth, here of shape [1, 2, 2, 3], e.g.
This operation, for block_size of 2, will return the following tensor of shape [1, 1, 1, 12]
Similarly, for the following input of shape [1 4 4 1], and a block size of 2:
the operator will return the following tensor of shape [1 2 2 4]:


Applies a sparse gradient to a given accumulator.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SparseAccumulatorApplyGradient
Does not add if local_step is smaller than the accumulator's global_step.


Extracts the average sparse gradient in a SparseConditionalAccumulator.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SparseAccumulatorTakeGradient
The op will blocks until sufficient (i.e., more than num_required) gradients have been accumulated. If the accumulator has already aggregated more than num_required gradients, it will return its average of the accumulated gradients. Also automatically increments the recorded global_step in the accumulator by 1, and resets the aggregate to 0.


Adds two SparseTensor objects to produce another SparseTensor.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SparseAdd
The input SparseTensor objects' indices are assumed ordered in standard lexicographic order. If this is not the case, before this step run SparseReorder to restore index ordering.
By default, if two values sum to zero at some index, the output SparseTensor would still include that particular location in its index, storing a zero in the corresponding value slot. To override this, callers can specify thresh, indicating that if the sum has a magnitude strictly smaller than thresh, its corresponding value and index would then not be included. In particular, thresh == 0 (default) means everything is kept and actual thresholding happens only for a positive value.
In the following shapes, nnz is the count after taking thresh into account.


The gradient operator for the SparseAdd op.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SparseAddGrad
The SparseAdd op calculates A + B, where A, B, and the sum are all represented as SparseTensor objects. This op takes in the upstream gradient w.r.t. non-empty values of the sum, and outputs the gradients w.r.t. the non-empty values of A and B.


var: Should be from a Variable().
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SparseApplyAdadelta


Update relevant entries in 'var' and 'accum' according to the adagrad scheme.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SparseApplyAdagrad
That is for rows we have grad for, we update var and accum as follows:


Update entries in 'var' and 'accum' according to the proximal adagrad scheme.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SparseApplyAdagradDA


Update relevant entries in 'var' and 'accum' according to the adagrad scheme.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SparseApplyAdagradV2
That is for rows we have grad for, we update var and accum as follows:


Update '*var' according to the centered RMSProp algorithm.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SparseApplyCenteredRMSProp
The centered RMSProp algorithm uses an estimate of the centered second moment (i.e., the variance) for normalization, as opposed to regular RMSProp, which uses the (uncentered) second moment. This often helps with training, but is slightly more expensive in terms of computation and memory.
Note that in dense implementation of this algorithm, mg, ms, and mom will update even if the grad is zero, but in this sparse implementation, mg, ms, and mom will not update in iterations during which the grad is zero.
mean_square = decay * mean_square + (1-decay) * gradient ** 2 mean_grad = decay * mean_grad + (1-decay) * gradient Delta = learning_rate * gradient / sqrt(mean_square + epsilon - mean_grad ** 2)
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates. Some content is licensed under the numpy license.
Last updated 2021-02-18 UTC.


Update relevant entries in '*var' according to the Ftrl-proximal scheme.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SparseApplyFtrl
That is for rows we have grad for, we update var, accum and linear as follows:


Update relevant entries in '*var' according to the Ftrl-proximal scheme.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SparseApplyFtrlV2
That is for rows we have grad for, we update var, accum and linear as follows: grad_with_shrinkage = grad + 2 * l2_shrinkage * var accum_new = accum + grad * grad linear += grad_with_shrinkage - (accum_new^(-lr_power) - accum^(-lr_power)) / lr * var quadratic = 1.0 / (accum_new^(lr_power) * lr) + 2 * l2 var = (sign(linear) * l1 - linear) / quadratic if |linear| > l1 else 0.0 accum = accum_new


Update relevant entries in 'var' and 'accum' according to the momentum scheme.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SparseApplyMomentum
Set use_nesterov = True if you want to use Nesterov momentum.
That is for rows we have grad for, we update var and accum as follows:


Sparse update entries in 'var' and 'accum' according to FOBOS algorithm.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SparseApplyProximalAdagrad
That is for rows we have grad for, we update var and accum as follows:


Sparse update '*var' as FOBOS algorithm with fixed learning rate.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SparseApplyProximalGradientDescent
That is for rows we have grad for, we update var as follows:


Update '*var' according to the RMSProp algorithm.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SparseApplyRMSProp
Note that in dense implementation of this algorithm, ms and mom will update even if the grad is zero, but in this sparse implementation, ms and mom will not update in iterations during which the grad is zero.
mean_square = decay * mean_square + (1-decay) * gradient ** 2 Delta = learning_rate * gradient / sqrt(mean_square + epsilon)
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates. Some content is licensed under the numpy license.
Last updated 2021-02-18 UTC.


Counts the number of occurrences of each value in an integer array.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SparseBincount
Outputs a vector with length size and the same dtype as weights. If weights are empty, then index i stores the number of times the value i is counted in arr. If weights are non-empty, then index i stores the sum of the value in weights at each index where the corresponding value in arr is i.
Values in arr outside of the range [0, size) are ignored.


Concatenates a list of SparseTensor along the specified dimension.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SparseConcat
Concatenation is with respect to the dense versions of these sparse tensors. It is assumed that each input is a SparseTensor whose elements are ordered along increasing dimension number.
All inputs' shapes must match, except for the concat dimension. The indices, values, and shapes lists must have the same length.
The output shape is identical to the inputs', except along the concat dimension, where it is the sum of the inputs' sizes along that dimension.
The output elements will be resorted to preserve the sort order along increasing dimension number.
This op runs in O(M log M) time, where M is the total number of non-empty values across all inputs. This is due to the need for an internal sort in order to concatenate efficiently across an arbitrary dimension.
For example, if concat_dim = 1 and the inputs are
then the output will be
Graphically this is equivalent to doing


A conditional accumulator for aggregating sparse gradients.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SparseConditionalAccumulator
The accumulator accepts gradients marked with local_step greater or equal to the most recent global_step known to the accumulator. The average can be extracted from the accumulator, provided sufficient gradients have been accumulated. Extracting the average automatically resets the aggregate to 0, and increments the global_step recorded by the accumulator.


Performs sparse-output bin counting for a sparse tensor input.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SparseCountSparseOutput
Counts the number of times each value occurs in the input.


Generates sparse cross from a list of sparse and dense tensors.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SparseCross
The op takes two lists, one of 2D SparseTensor and one of 2D Tensor, each representing features of one feature column. It outputs a 2D SparseTensor with the batchwise crosses of these features.
For example, if the inputs are
then the output will be
if hashed_output=true then the output will be


Generates sparse cross from a list of sparse and dense tensors.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SparseCrossHashed
The op takes two lists, one of 2D SparseTensor and one of 2D Tensor, each representing features of one feature column. It outputs a 2D SparseTensor with the batchwise crosses of these features.
For example, if the inputs are
then the output will be
if hashed_output=true then the output will be


Generates sparse cross from a list of sparse and dense tensors.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SparseCrossV2
The op takes two lists, one of 2D SparseTensor and one of 2D Tensor, each representing features of one feature column. It outputs a 2D SparseTensor with the batchwise crosses of these features.
For example, if the inputs are
then the output will be
if hashed_output=true then the output will be


Adds up a SparseTensor and a dense Tensor, using these special rules:
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SparseDenseCwiseAdd
(1) Broadcasts the dense side to have the same shape as the sparse side, if eligible; (2) Then, only the dense values pointed to by the indices of the SparseTensor participate in the cwise addition.
By these rules, the result is a logical SparseTensor with exactly the same indices and shape, but possibly with different non-zero values. The output of this Op is the resultant non-zero values.


Component-wise divides a SparseTensor by a dense Tensor.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SparseDenseCwiseDiv
Limitation: this Op only broadcasts the dense side to the sparse side, but not the other direction.


Component-wise multiplies a SparseTensor by a dense Tensor.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SparseDenseCwiseMul
The output locations corresponding to the implicitly zero elements in the sparse tensor will be zero (i.e., will not take up storage space), regardless of the contents of the dense tensor (even if it's +/-INF and that INF*0 == NaN).
Limitation: this Op only broadcasts the dense side to the sparse side, but not the other direction.


Fills empty rows in the input 2-D SparseTensor with a default value.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SparseFillEmptyRows
The input SparseTensor is represented via the tuple of inputs (indices, values, dense_shape). The output SparseTensor has the same dense_shape but with indices output_indices and values output_values.
This op inserts a single entry for every row that doesn't have any values. The index is created as [row, 0, ..., 0] and the inserted value is default_value.
For example, suppose sp_input has shape [5, 6] and non-empty values:
Rows 1 and 4 are empty, so the output will be of shape [5, 6] with values:
The output SparseTensor will be in row-major order and will have the same shape as the input.
This op also returns an indicator vector shaped [dense_shape[0]] such that
And a reverse index map vector shaped [indices.shape[0]] that is used during backpropagation,


The gradient of SparseFillEmptyRows.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SparseFillEmptyRowsGrad
Takes vectors reverse_index_map, shaped [N], and grad_values, shaped [N_full], where N_full >= N and copies data into either d_values or d_default_value. Here d_values is shaped [N] and d_default_value is a scalar.
d_values[j] = grad_values[reverse_index_map[j]] d_defaultvalue = sum{k : 0 .. N_full - 1} ( grad_values[k] * 1{k not in reverse_index_map})


Multiply matrix "a" by matrix "b".
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SparseMatMul
The inputs must be two-dimensional matrices and the inner dimension of "a" must match the outer dimension of "b". Both "a" and "b" must be Tensors not SparseTensors. This op is optimized for the case where at least one of "a" or "b" is sparse, in the sense that they have a large proportion of zero values. The breakeven for using this versus a dense matrix multiply on one platform was 30% zero values in the sparse matrix.
The gradient computation of this operation will only take advantage of sparsity in the input gradient when that gradient comes from a Relu.


Sparse addition of two CSR matrices, C = alpha * A + beta * B.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SparseMatrixAdd
The gradients of SparseMatrixAdd outputs with respect to alpha and beta are not currently defined (TensorFlow will return zeros for these entries).


Matrix-multiplies a sparse matrix with a dense matrix.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SparseMatrixMatMul
Returns a dense matrix. For inputs A and B, where A is CSR and B is dense; this op returns a dense C;
If transpose_output is false, returns:
If transpose_output is true, returns:
where the transposition is performed along the two innermost (matrix) dimensions.
If conjugate_output is true, returns:
If both conjugate_output and transpose_output are true, returns:


Element-wise multiplication of a sparse matrix with a dense tensor.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SparseMatrixMul
Returns a sparse matrix.
The dense tensor b may be either a scalar; otherwise a must be a rank-3 SparseMatrix; in this case b must be shaped [batch_size, 1, 1] and the multiply operation broadcasts.


Returns the number of nonzeroes of sparse_matrix.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SparseMatrixNNZ


Computes the Approximate Minimum Degree (AMD) ordering of input.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SparseMatrixOrderingAMD
Computes the Approximate Minimum Degree (AMD) ordering for a sparse matrix.
The returned permutation may be used to permute the rows and columns of the given sparse matrix. This typically results in permuted sparse matrix's sparse Cholesky (or other decompositions) in having fewer zero fill-in compared to decomposition of the original matrix.
The input sparse matrix may have rank 2 or rank 3. The output Tensor, representing would then have rank 1 or 2 respectively, with the same batch shape as the input.
Each component of the input sparse matrix must represent a square symmetric matrix; only the lower triangular part of the matrix is read. The values of the sparse matrix does not affect the returned permutation, only the sparsity pattern of the sparse matrix is used. Hence, a single AMD ordering may be reused for the Cholesky decompositions of sparse matrices with the same sparsity pattern but with possibly different values.
Each batch component of the output permutation represents a permutation of N elements, where the input sparse matrix components each have N rows. That is, the component contains each of the integers {0, .. N-1} exactly once. The ith element represents the row index that the ith row maps to.
ordering_amd_value stores the AMD ordering: [1 2 3 0].
input: A CSRSparseMatrix.


Calculates the softmax of a CSRSparseMatrix.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SparseMatrixSoftmax
Calculate the softmax of the innermost dimensions of a SparseMatrix.
Missing values are treated as -inf (i.e., logits of zero probability); and the output has the same sparsity structure as the input (though missing values in the output may now be treated as having probability zero).


Calculates the gradient of the SparseMatrixSoftmax op.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SparseMatrixSoftmaxGrad


Computes the sparse Cholesky decomposition of input.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SparseMatrixSparseCholesky
Computes the Sparse Cholesky decomposition of a sparse matrix, with the given fill-in reducing permutation.
The input sparse matrix and the fill-in reducing permutation permutation must have compatible shapes. If the sparse matrix has rank 3; with the batch dimension B, then the permutation must be of rank 2; with the same batch dimension B. There is no support for broadcasting.
Furthermore, each component vector of permutation must be of length N, containing each of the integers {0, 1, ..., N - 1} exactly once, where N is the number of rows of each component of the sparse matrix.
Each component of the input sparse matrix must represent a symmetric positive definite (SPD) matrix; although only the lower triangular part of the matrix is read. If any individual component is not SPD, then an InvalidArgument error is thrown.
The returned sparse matrix has the same dense shape as the input sparse matrix. For each component A of the input sparse matrix, the corresponding output sparse matrix represents L, the lower triangular Cholesky factor satisfying the following identity:
where Lt denotes the transpose of L (or its conjugate transpose, if type is complex64 or complex128).
The type parameter denotes the type of the matrix elements. The supported types are: float32, float64, complex64 and complex128.
dense_cholesky_value stores the dense Cholesky factor:
input: A CSRSparseMatrix. permutation: A Tensor. type: The type of input.


Sparse-matrix-multiplies two CSR matrices a and b.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SparseMatrixSparseMatMul
Performs a matrix multiplication of a sparse matrix a with a sparse matrix b; returns a sparse matrix a * b, unless either a or b is transposed or adjointed.
Each matrix may be transposed or adjointed (conjugated and transposed) according to the Boolean parameters transpose_a, adjoint_a, transpose_b and adjoint_b. At most one of transpose_a or adjoint_a may be True. Similarly, at most one of transpose_b or adjoint_b may be True.
The inputs must have compatible shapes. That is, the inner dimension of a must be equal to the outer dimension of b. This requirement is adjusted according to whether either a or b is transposed or adjointed.
The type parameter denotes the type of the matrix elements. Both a and b must have the same type. The supported types are: float32, float64, complex64 and complex128.
Both a and b must have the same rank. Broadcasting is not supported. If they have rank 3, each batch of 2D CSRSparseMatrices within a and b must have the same dense shape.
The sparse matrix product may have numeric (non-structural) zeros.
zeros.
c_sm_dense_value stores the dense matrix product:
a: A CSRSparseMatrix. b: A CSRSparseMatrix with the same type and rank as a. type: The type of both a and b. transpose_a: If True, a transposed before multiplication. transpose_b: If True, b transposed before multiplication. adjoint_a: If True, a adjointed before multiplication. adjoint_b: If True, b adjointed before multiplication.


Transposes the inner (matrix) dimensions of a CSRSparseMatrix.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SparseMatrixTranspose
Transposes the inner (matrix) dimensions of a SparseMatrix and optionally conjugates its values.


Creates an all-zeros CSRSparseMatrix with shape dense_shape.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SparseMatrixZeros


Computes the max of elements across dimensions of a SparseTensor.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SparseReduceMax
This Op takes a SparseTensor and is the sparse counterpart to tf.reduce_max(). In particular, this Op also returns a dense Tensor instead of a sparse one.
Reduces sp_input along the dimensions given in reduction_axes. Unless keep_dims is true, the rank of the tensor is reduced by 1 for each entry in reduction_axes. If keep_dims is true, the reduced dimensions are retained with length 1.
If reduction_axes has no entries, all dimensions are reduced, and a tensor with a single element is returned. Additionally, the axes can be negative, which are interpreted according to the indexing rules in Python.


Computes the max of elements across dimensions of a SparseTensor.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SparseReduceMaxSparse
This Op takes a SparseTensor and is the sparse counterpart to tf.reduce_max(). In contrast to SparseReduceMax, this Op returns a SparseTensor.
Reduces sp_input along the dimensions given in reduction_axes. Unless keep_dims is true, the rank of the tensor is reduced by 1 for each entry in reduction_axes. If keep_dims is true, the reduced dimensions are retained with length 1.
If reduction_axes has no entries, all dimensions are reduced, and a tensor with a single element is returned. Additionally, the axes can be negative, which are interpreted according to the indexing rules in Python.


Computes the sum of elements across dimensions of a SparseTensor.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SparseReduceSum
This Op takes a SparseTensor and is the sparse counterpart to tf.reduce_sum(). In particular, this Op also returns a dense Tensor instead of a sparse one.
Reduces sp_input along the dimensions given in reduction_axes. Unless keep_dims is true, the rank of the tensor is reduced by 1 for each entry in reduction_axes. If keep_dims is true, the reduced dimensions are retained with length 1.
If reduction_axes has no entries, all dimensions are reduced, and a tensor with a single element is returned. Additionally, the axes can be negative, which are interpreted according to the indexing rules in Python.


Computes the sum of elements across dimensions of a SparseTensor.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SparseReduceSumSparse
This Op takes a SparseTensor and is the sparse counterpart to tf.reduce_sum(). In contrast to SparseReduceSum, this Op returns a SparseTensor.
Reduces sp_input along the dimensions given in reduction_axes. Unless keep_dims is true, the rank of the tensor is reduced by 1 for each entry in reduction_axes. If keep_dims is true, the reduced dimensions are retained with length 1.
If reduction_axes has no entries, all dimensions are reduced, and a tensor with a single element is returned. Additionally, the axes can be negative, which are interpreted according to the indexing rules in Python.


Reorders a SparseTensor into the canonical, row-major ordering.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SparseReorder
Note that by convention, all sparse ops preserve the canonical ordering along increasing dimension number. The only time ordering can be violated is during manual manipulation of the indices and values vectors to add entries.
Reordering does not affect the shape of the SparseTensor.
If the tensor has rank R and N non-empty values, input_indices has shape [N, R], input_values has length N, and input_shape has length R.


Reshapes a SparseTensor to represent values in a new dense shape.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SparseReshape
This operation has the same semantics as reshape on the represented dense tensor. The input_indices are recomputed based on the requested new_shape.
If one component of new_shape is the special value -1, the size of that dimension is computed so that the total dense size remains constant. At most one component of new_shape can be -1. The number of dense elements implied by new_shape must be the same as the number of dense elements originally implied by input_shape.
Reshaping does not affect the order of values in the SparseTensor.
If the input tensor has rank R_in and N non-empty values, and new_shape has length R_out, then input_indices has shape [N, R_in], input_shape has length R_in, output_indices has shape [N, R_out], and output_shape has length R_out.


Computes the mean along sparse segments of a tensor.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SparseSegmentMean
See tf.sparse.segment_sum for usage examples.
Like SegmentMean, but segment_ids can have rank less than data's first dimension, selecting a subset of dimension 0, specified by indices.


Computes gradients for SparseSegmentMean.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SparseSegmentMeanGrad
Returns tensor "output" with same shape as grad, except for dimension 0 whose value is output_dim0.


Computes the mean along sparse segments of a tensor.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SparseSegmentMeanWithNumSegments
Like SparseSegmentMean, but allows missing ids in segment_ids. If an id is missing, the output tensor at that position will be zeroed.
Read the section on segmentation for an explanation of segments.


Computes the sum along sparse segments of a tensor divided by the sqrt of N.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SparseSegmentSqrtN
N is the size of the segment being reduced.
See tf.sparse.segment_sum for usage examples.


Computes gradients for SparseSegmentSqrtN.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SparseSegmentSqrtNGrad
Returns tensor "output" with same shape as grad, except for dimension 0 whose value is output_dim0.


Computes the sum along sparse segments of a tensor divided by the sqrt of N.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SparseSegmentSqrtNWithNumSegments
N is the size of the segment being reduced.
Like SparseSegmentSqrtN, but allows missing ids in segment_ids. If an id is missing, the output tensor at that position will be zeroed.
Read the section on segmentation for an explanation of segments.


Computes the sum along sparse segments of a tensor.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SparseSegmentSum
Read the section on segmentation for an explanation of segments.
Like SegmentSum, but segment_ids can have rank less than data's first dimension, selecting a subset of dimension 0, specified by indices.


Computes the sum along sparse segments of a tensor.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SparseSegmentSumWithNumSegments
Like SparseSegmentSum, but allows missing ids in segment_ids. If an id is missing, the output tensor at that position will be zeroed.
Read the section on segmentation for an explanation of segments.


Slice a SparseTensor based on the start and size.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SparseSlice
For example, if the input is
Graphically the output tensors are:


The gradient operator for the SparseSlice op.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SparseSliceGrad
This op takes in the upstream gradient w.r.t. non-empty values of the sliced SparseTensor, and outputs the gradients w.r.t. the non-empty values of input SparseTensor.


Applies softmax to a batched N-D SparseTensor.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SparseSoftmax
The inputs represent an N-D SparseTensor with logical shape [..., B, C] (where N >= 2), and with indices sorted in the canonical lexicographic order.
This op is equivalent to applying the normal tf.nn.softmax() to each innermost logical submatrix with shape [B, C], but with the catch that the implicitly zero elements do not participate. Specifically, the algorithm is equivalent to the following:
(1) Applies tf.nn.softmax() to a densified view of each innermost submatrix with shape [B, C], along the size-C dimension; (2) Masks out the original implicitly-zero locations; (3) Renormalizes the remaining elements.
Hence, the SparseTensor result has exactly the same non-zero indices and shape.


Computes softmax cross entropy cost and gradients to backpropagate.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SparseSoftmaxCrossEntropyWithLogits
Unlike SoftmaxCrossEntropyWithLogits, this operation does not accept a matrix of label probabilities, but rather a single label per row of features. This label is considered to have probability 1.0 for the given row.
Inputs are the logits, not probabilities.


Returns the element-wise max of two SparseTensors.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SparseSparseMaximum
Assumes the two SparseTensors have the same shape, i.e., no broadcasting.


Returns the element-wise min of two SparseTensors.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SparseSparseMinimum
Assumes the two SparseTensors have the same shape, i.e., no broadcasting.


Split a SparseTensor into num_split tensors along one dimension.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SparseSplit
If the shape[split_dim] is not an integer multiple of num_split. Slices [0 : shape[split_dim] % num_split] gets one extra dimension. For example, if split_dim = 1 and num_split = 2 and the input is
Graphically the output tensors are:


Adds up a SparseTensor and a dense Tensor, producing a dense Tensor.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SparseTensorDenseAdd
This Op does not require a_indices be sorted in standard lexicographic order.


Multiply SparseTensor (of rank 2) "A" by dense matrix "B".
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SparseTensorDenseMatMul
No validity checking is performed on the indices of A. However, the following input format is recommended for optimal behavior:
if adjoint_a == false: A should be sorted in lexicographically increasing order. Use SparseReorder if you're not sure. if adjoint_a == true: A should be sorted in order of increasing dimension 1 (i.e., "column major" order instead of "row major" order).


Creates a dataset that splits a SparseTensor into elements row-wise.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SparseTensorSliceDataset


Converts a SparseTensor to a (possibly batched) CSRSparseMatrix.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SparseTensorToCSRSparseMatrix


Converts a sparse representation into a dense tensor.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SparseToDense
Builds an array dense with shape output_shape such that
All other values in dense are set to default_value. If sparse_values is a scalar, all sparse indices are set to this single value.
Indices should be sorted in lexicographic order, and indices must not contain any repeats. If validate_indices is true, these properties are checked during execution.


Applies set operation along last dimension of 2 SparseTensor inputs.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SparseToSparseSetOperation
See SetOperationOp::SetOperationFromContext for values of set_operation.
If validate_indices is True, SparseToSparseSetOperation validates the order and range of set1 and set2 indices.
Input set1 is a SparseTensor represented by set1_indices, set1_values, and set1_shape. For set1 ranked n, 1st n-1 dimensions must be the same as set2. Dimension n contains values in a set, duplicates are allowed but ignored.
Input set2 is a SparseTensor represented by set2_indices, set2_values, and set2_shape. For set2 ranked n, 1st n-1 dimensions must be the same as set1. Dimension n contains values in a set, duplicates are allowed but ignored.
If validate_indices is True, this op validates the order and range of set1 and set2 indices.
Output result is a SparseTensor represented by result_indices, result_values, and result_shape. For set1 and set2 ranked n, this has rank n and the same 1st n-1 dimensions as set1 and set2. The nth dimension contains the result of set_operation applied to the corresponding [0...n-1] dimension of set.


Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.Spence


Splits a tensor into num_split tensors along one dimension.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.Split


Splits a tensor into num_split tensors along one dimension.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SplitV


Creates a dataset that executes a SQL query and emits rows of the result set.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SqlDataset


Computes square root of x element-wise.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.Sqrt
I.e., \(y = \sqrt{x} = x^{1/2}\).


Computes the gradient for the sqrt of x wrt its input.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SqrtGrad
Specifically, grad = dy * 0.5 / y, where y = sqrt(x), and dy is the corresponding input gradient.


Computes square of x element-wise.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.Square
I.e., \(y = x * x = x^2\).


Returns conj(x - y)(x - y) element-wise.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SquaredDifference


Removes dimensions of size 1 from the shape of a tensor.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.Squeeze
Given a tensor input, this operation returns a tensor of the same type with all dimensions of size 1 removed. If you don't want to remove all size 1 dimensions, you can remove specific size 1 dimensions by specifying axis.
Or, to remove specific size 1 dimensions:


Deprecated, use StackV2.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.Stack


Deprecated, use StackCloseV2.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.StackClose


Delete the stack from its resource container.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.StackCloseV2


Deprecated, use StackPopV2.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.StackPop


Pop the element at the top of the stack.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.StackPopV2


Deprecated, use StackPushV2.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.StackPush


Push an element onto the stack.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.StackPushV2


A stack that produces elements in first-in last-out order.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.StackV2


Stage values similar to a lightweight Enqueue.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.Stage
The basic functionality of this Op is similar to a queue with many fewer capabilities and options. This Op is optimized for performance.


Op removes all elements in the underlying container.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.StageClear


Op peeks at the values at the specified index. If the
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.StagePeek
underlying container does not contain sufficient elements this op will block until it does. This Op is optimized for performance.


Op returns the number of elements in the underlying container.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.StageSize


returns f(inputs), where f's body is placed and partitioned.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.StatefulPartitionedCall


Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.StatefulRandomBinomial


Outputs random values from a normal distribution. This op is deprecated in favor of op 'StatefulStandardNormalV2'
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.StatefulStandardNormal
The generated values will have mean 0 and standard deviation 1.


Outputs random values from a normal distribution.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.StatefulStandardNormalV2
The generated values will have mean 0 and standard deviation 1.


Outputs random values from a truncated normal distribution.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.StatefulTruncatedNormal
The generated values follow a normal distribution with mean 0 and standard deviation 1, except that values whose magnitude is more than 2 standard deviations from the mean are dropped and re-picked.


Outputs random values from a uniform distribution.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.StatefulUniform
The generated values follow a uniform distribution in the range [0, 1). The lower bound 0 is included in the range, while the upper bound 1 is excluded.


Outputs random integers from a uniform distribution.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.StatefulUniformFullInt
The generated values are uniform integers covering the whole range of dtype.


Outputs random integers from a uniform distribution.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.StatefulUniformInt
The generated values are uniform integers in the range [minval, maxval). The lower bound minval is included in the range, while the upper bound maxval is excluded.
The random integers are slightly biased unless maxval - minval is an exact power of two. The bias is small for values of maxval - minval significantly smaller than the range of the output (either 2^32 or 2^64).


An n-way switch statement which calls a single branch function.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.StatelessCase


output = cond ? then_branch(input) : else_branch(input)
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.StatelessIf
This should only be used when the if then/else body functions do not have stateful ops.


Draws samples from a multinomial distribution.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.StatelessMultinomial


Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.StatelessParameterizedTruncatedNormal


Outputs deterministic pseudorandom random numbers from a binomial distribution.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.StatelessRandomBinomial
Outputs random values from a binomial distribution.
The outputs are a deterministic function of shape, seed, counts, and probs.


Outputs deterministic pseudorandom random numbers from a gamma distribution.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.StatelessRandomGammaV2
Outputs random values from a gamma distribution.
The outputs are a deterministic function of shape, seed, and alpha.


Picks the best algorithm based on device, and scrambles seed into key and counter.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.StatelessRandomGetKeyCounterAlg
This op picks the best counter-based RNG algorithm based on device, and scrambles a shape-[2] seed into a key and a counter, both needed by the counter-based algorithm. The scrambling is opaque but approximately satisfies the property that different seed results in different key/counter pair (which will in turn result in different random numbers).


Outputs deterministic pseudorandom values from a normal distribution.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.StatelessRandomNormal
The generated values will have mean 0 and standard deviation 1.
The outputs are a deterministic function of shape and seed.


Outputs deterministic pseudorandom values from a normal distribution.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.StatelessRandomNormalV2
The generated values will have mean 0 and standard deviation 1.
The outputs are a deterministic function of shape, key, counter and alg.


Outputs deterministic pseudorandom random numbers from a Poisson distribution.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.StatelessRandomPoisson
Outputs random values from a Poisson distribution.
The outputs are a deterministic function of shape, seed, and lam.


Outputs deterministic pseudorandom random values from a uniform distribution.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.StatelessRandomUniform
The generated values follow a uniform distribution in the range [0, 1). The lower bound 0 is included in the range, while the upper bound 1 is excluded.
The outputs are a deterministic function of shape and seed.


Outputs deterministic pseudorandom random integers from a uniform distribution.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.StatelessRandomUniformFullInt
The generated values are uniform integers covering the whole range of dtype.
The outputs are a deterministic function of shape and seed.


Outputs deterministic pseudorandom random integers from a uniform distribution.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.StatelessRandomUniformFullIntV2
The generated values are uniform integers covering the whole range of dtype.
The outputs are a deterministic function of shape, key, counter and alg.


Outputs deterministic pseudorandom random integers from a uniform distribution.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.StatelessRandomUniformInt
The generated values follow a uniform distribution in the range [minval, maxval).
The outputs are a deterministic function of shape, seed, minval, and maxval.


Outputs deterministic pseudorandom random integers from a uniform distribution.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.StatelessRandomUniformIntV2
The generated values follow a uniform distribution in the range [minval, maxval).
The outputs are a deterministic function of shape, key, counter, alg, minval and maxval.


Outputs deterministic pseudorandom random values from a uniform distribution.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.StatelessRandomUniformV2
The generated values follow a uniform distribution in the range [0, 1). The lower bound 0 is included in the range, while the upper bound 1 is excluded.
The outputs are a deterministic function of shape, key, counter and alg.


Generate a randomly distorted bounding box for an image deterministically.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.StatelessSampleDistortedBoundingBox
Bounding box annotations are often supplied in addition to ground-truth labels in image recognition or object localization tasks. A common technique for training such a system is to randomly distort an image while preserving its content, i.e. data augmentation. This Op, given the same seed, deterministically outputs a randomly distorted localization of an object, i.e. bounding box, given an image_size, bounding_boxes and a series of constraints.
The output of this Op is a single bounding box that may be used to crop the original image. The output is returned as 3 tensors: begin, size and bboxes. The first 2 tensors can be fed directly into tf.slice to crop the image. The latter may be supplied to tf.image.draw_bounding_boxes to visualize what the bounding box looks like.
Bounding boxes are supplied and returned as [y_min, x_min, y_max, x_max]. The bounding box coordinates are floats in [0.0, 1.0] relative to the width and the height of the underlying image.
The output of this Op is guaranteed to be the same given the same seed and is independent of how many times the function is called, and independent of global seed settings (e.g. tf.random.set_seed).
Note that if no bounding box information is available, setting use_image_if_no_bounding_boxes = true will assume there is a single implicit bounding box covering the whole image. If use_image_if_no_bounding_boxes is false and no bounding boxes are supplied, an error is raised.


Outputs deterministic pseudorandom values from a truncated normal distribution.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.StatelessTruncatedNormal
The generated values follow a normal distribution with mean 0 and standard deviation 1, except that values whose magnitude is more than 2 standard deviations from the mean are dropped and re-picked.
The outputs are a deterministic function of shape and seed.


Outputs deterministic pseudorandom values from a truncated normal distribution.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.StatelessTruncatedNormalV2
The generated values follow a normal distribution with mean 0 and standard deviation 1, except that values whose magnitude is more than 2 standard deviations from the mean are dropped and re-picked.
The outputs are a deterministic function of shape, key, counter and alg.


output = input; While (Cond(output)) { output = Body(output) }
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.StatelessWhile
This should only be used when the while condition and body functions do not have stateful ops.


Check if the input matches the regex pattern.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.StaticRegexFullMatch
The input is a string tensor of any shape. The pattern is the regular expression to be matched with every element of the input tensor. The boolean values (True or False) of the output tensor indicate if the input matches the regex pattern provided.
The pattern follows the re2 syntax (https://github.com/google/re2/wiki/Syntax)


Replaces the match of pattern in input with rewrite.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.StaticRegexReplace
It follows the re2 syntax (https://github.com/google/re2/wiki/Syntax)


Creates a statistics manager resource.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.StatsAggregatorHandle


Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.StatsAggregatorHandleV2


Set a summary_writer_interface to record statistics using given stats_aggregator.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.StatsAggregatorSetSummaryWriter


Produces a summary of any statistics recorded by the given statistics manager.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.StatsAggregatorSummary


Stops gradient computation.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.StopGradient
When executed in a graph, this op outputs its input tensor as-is.
When building ops to compute gradients, this op prevents the contribution of its inputs to be taken into account. Normally, the gradient generator adds ops to a graph to compute the derivatives of a specified 'loss' by recursively finding out inputs that contributed to its computation. If you insert this op in the graph it inputs are masked from the gradient generator. They are not taken into account for computing gradients.
This is useful any time you want to compute a value with TensorFlow but need to pretend that the value was a constant. Some examples include:


Return a strided slice from input.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.StridedSlice
Note, most python users will want to use the Python Tensor.getitem or Variable.getitem rather than this op directly.
The goal of this op is to produce a new tensor with a subset of the elements from the n dimensional input tensor. The subset is chosen using a sequence of m sparse range specifications encoded into the arguments of this function. Note, in some cases m could be equal to n, but this need not be the case. Each range specification entry can be one of the following:
An ellipsis (...). Ellipses are used to imply zero or more dimensions of full-dimension selection and are produced using ellipsis_mask. For example, foo[...] is the identity slice.
A new axis. This is used to insert a new shape=1 dimension and is produced using new_axis_mask. For example, foo[:, ...] where foo is shape (3, 4) produces a (1, 3, 4) tensor.
A range begin:end:stride. This is used to specify how much to choose from a given dimension. stride can be any integer but 0. begin is an integer which represents the index of the first value to select while end represents the index of the last value to select. The number of values selected in each dimension is end - begin if stride > 0 and begin - end if stride < 0. begin and end can be negative where -1 is the last element, -2 is the second to last. begin_mask controls whether to replace the explicitly given begin with an implicit effective value of 0 if stride > 0 and -1 if stride < 0. end_mask is analogous but produces the number required to create the largest open interval. For example, given a shape (3,) tensor foo[:], the effective begin and end are 0 and 3. Do not assume this is equivalent to foo[0:-1] which has an effective begin and end of 0 and 2. Another example is foo[-2::-1] which reverses the first dimension of a tensor while dropping the last two (in the original order elements). For example foo = [1,2,3,4]; foo[-2::-1] is [4,3].
A single index. This is used to keep only elements that have a given index. For example (foo[2, :] on a shape (5,6) tensor produces a shape (6,) tensor. This is encoded in begin and end and shrink_axis_mask.
Each conceptual range specification is encoded in the op's argument. This encoding is best understand by considering a non-trivial example. In particular, foo[1, 2:4, None, ..., :-3:-1, :] will be encoded as
In this case if foo.shape is (5, 5, 5, 5, 5, 5) the final shape of the slice becomes (2, 1, 5, 5, 2, 5). Let us walk step by step through each argument specification.
The first argument in the example slice is turned into begin = 1 and end = begin + 1 = 2. To disambiguate from the original spec 2:4 we also set the appropriate bit in shrink_axis_mask.
2:4 is contributes 2, 4, 1 to begin, end, and stride. All masks have zero bits contributed.
None is a synonym for tf.newaxis. This means insert a dimension of size 1 dimension in the final shape. Dummy values are contributed to begin, end and stride, while the new_axis_mask bit is set.
... grab the full ranges from as many dimensions as needed to fully specify a slice for every dimension of the input shape.
:-3:-1 shows the use of negative indices. A negative index i associated with a dimension that has shape s is converted to a positive index s + i. So -1 becomes s-1 (i.e. the last element). This conversion is done internally so begin, end and strides receive x, -3, and -1. The appropriate begin_mask bit is set to indicate the start range is the full range (ignoring the x).
: indicates that the entire contents of the corresponding dimension is selected. This is equivalent to :: or 0::1. begin, end, and strides receive 0, 0, and 1, respectively. The appropriate bits in begin_mask and end_mask are also set.
Requirements: 0 != strides[i] for i in [0, m) ellipsis_mask must be a power of two (only one ellipsis)


Assign value to the sliced l-value reference of ref.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.StridedSliceAssign
The values of value are assigned to the positions in the variable ref that are selected by the slice parameters. The slice parameters begin, end, strides, etc. work exactly as in StridedSlice.
NOTE this op currently does not support broadcasting and so value's shape must be exactly the shape produced by the slice of ref.


Returns the gradient of StridedSlice.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.StridedSliceGrad
Since StridedSlice cuts out pieces of its input which is size shape, its gradient will have the same shape (which is passed here as shape). The gradient will be zero in any element that the slice does not select.
Arguments are the same as StridedSliceGrad with the exception that dy is the input gradient to be propagated and shape is the shape of StridedSlice's input.


Formats a string template using a list of tensors.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.StringFormat
Formats a string template using a list of tensors, pretty-printing tensor summaries.


Joins the strings in the given list of string tensors into one tensor;
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.StringJoin
with the given separator (default is an empty separator).


String lengths of input.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.StringLength
Computes the length of each string given in the input tensor.


Converts all uppercase characters into their respective lowercase replacements.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.StringLower


Creates ngrams from ragged string data.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.StringNGrams
This op accepts a ragged tensor with 1 ragged dimension containing only strings and outputs a ragged tensor with 1 ragged dimension containing ngrams of that string, joined along the innermost axis.


Split elements of input based on delimiter into a SparseTensor.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.StringSplit
Let N be the size of source (typically N will be the batch size). Split each element of input based on delimiter and return a SparseTensor containing the splitted tokens. Empty tokens are ignored.
delimiter can be empty, or a string of split characters. If delimiter is an empty string, each element of input is split into individual single-byte character strings, including splitting of UTF-8 multibyte sequences. Otherwise every character of delimiter is a potential split point.
N = 2, input[0] is 'hello world' and input[1] is 'a b c', then the output will be
indices = [0, 0; 0, 1; 1, 0; 1, 1; 1, 2] shape = [2, 3] values = ['hello', 'world', 'a', 'b', 'c']


Split elements of source based on sep into a SparseTensor.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.StringSplitV2
Let N be the size of source (typically N will be the batch size). Split each element of source based on sep and return a SparseTensor containing the split tokens. Empty tokens are ignored.
For example, N = 2, source[0] is 'hello world' and source[1] is 'a b c', then the output will be
If sep is given, consecutive delimiters are not grouped together and are deemed to delimit empty strings. For example, source of "1<>2<><>3" and sep of "<>" returns ["1", "2", "", "3"]. If sep is None or an empty string, consecutive whitespace are regarded as a single separator, and the result will contain no empty strings at the startor end if the string has leading or trailing whitespace.
Note that the above mentioned behavior matches python's str.split.


Strip leading and trailing whitespaces from the Tensor.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.StringStrip


Converts each string in the input Tensor to its hash mod by a number of buckets.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.StringToHashBucket
The hash function is deterministic on the content of the string within the process.
Note that the hash function may change from time to time. This functionality will be deprecated and it's recommended to use tf.string_to_hash_bucket_fast() or tf.string_to_hash_bucket_strong().


Converts each string in the input Tensor to its hash mod by a number of buckets.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.StringToHashBucketFast
The hash function is deterministic on the content of the string within the process and will never change. However, it is not suitable for cryptography. This function may be used when CPU time is scarce and inputs are trusted or unimportant. There is a risk of adversaries constructing inputs that all hash to the same bucket. To prevent this problem, use a strong hash function with tf.string_to_hash_bucket_strong.


Converts each string in the input Tensor to its hash mod by a number of buckets.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.StringToHashBucketStrong
The hash function is deterministic on the content of the string within the process. The hash function is a keyed hash function, where attribute key defines the key of the hash function. key is an array of 2 elements.
A strong hash is important when inputs may be malicious, e.g. URLs with additional components. Adversaries could try to make their inputs hash to the same bucket for a denial-of-service attack or to skew the results. A strong hash can be used to make it difficult to find inputs with a skewed hash value distribution over buckets. This requires that the hash function is seeded by a high-entropy (random) "key" unknown to the adversary.
The additional robustness comes at a cost of roughly 4x higher compute time than tf.string_to_hash_bucket_fast.


Converts each string in the input Tensor to the specified numeric type.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.StringToNumber
(Note that int32 overflow results in an error while float overflow results in a rounded value.)


Converts all lowercase characters into their respective uppercase replacements.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.StringUpper


Returns x - y element-wise.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.Sub


Return substrings from Tensor of strings.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.Substr
For each string in the input Tensor, creates a substring starting at index pos with a total length of len.
If len defines a substring that would extend beyond the length of the input string, or if len is negative, then as many characters as possible are used.
A negative pos indicates distance within the string backwards from the end.
If pos specifies an index which is out of range for any of the input strings, then an InvalidArgumentError is thrown.
pos and len must have the same shape, otherwise a ValueError is thrown on Op creation.
Examples
Using scalar pos and len:
Using pos and len with same shape as input:
Broadcasting pos and len onto input:
Broadcasting input onto pos and len:


Computes the sum of elements across dimensions of a tensor.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.Sum
Reduces input along the dimensions given in axis. Unless keep_dims is true, the rank of the tensor is reduced by 1 for each entry in axis. If keep_dims is true, the reduced dimensions are retained with length 1.


Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SummaryWriter


Computes the singular value decompositions of one or more matrices.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.Svd
Computes the SVD of each inner matrix in input such that input[..., :, :] = u[..., :, :] * diag(s[..., :, :]) * transpose(v[..., :, :])


Forwards data to the output port determined by pred.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.Switch
If pred is true, the data input is forwarded to output_true. Otherwise, the data goes to output_false.
See also RefSwitch and Merge.


Computes the gradient function for function f via backpropagation.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SymbolicGradient
The function 'f' must be a numerical function which takes N inputs and produces M outputs. Its gradient function 'g', which is computed by this SymbolicGradient op is a function taking N + M inputs and produces N outputs.
I.e. if we have (y1, y2, ..., y_M) = f(x1, x2, ..., x_N), then, g is (dL/dx1, dL/dx2, ..., dL/dx_N) = g(x1, x2, ..., x_N, dL/dy1, dL/dy2, ..., dL/dy_M),
where L is a scalar-value function of (x1, x2, ..., xN) (e.g., the loss function). dL/dx_i is the partial derivative of L with respect to x_i.
(Needs some math expert to say the comment above better.)


Creates a dataset that contains count elements from the input_dataset.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.TakeDataset


Read SparseTensors from a SparseTensorsMap and concatenate them.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.TakeManySparseFromTensorsMap
The input sparse_handles must be an int64 matrix of shape [N, 1] where N is the minibatch size and the rows correspond to the output handles of AddSparseToTensorsMap or AddManySparseToTensorsMap. The ranks of the original SparseTensor objects that went into the given input ops must all match. When the final SparseTensor is created, it has rank one higher than the ranks of the incoming SparseTensor objects (they have been concatenated along a new row dimension on the left).
The output SparseTensor object's shape values for all dimensions but the first are the max across the input SparseTensor objects' shape values for the corresponding dimensions. Its first shape value is N, the minibatch size.
The input SparseTensor objects' indices are assumed ordered in standard lexicographic order. If this is not the case, after this step run SparseReorder to restore index ordering.
For example, if the handles represent an input, which is a [2, 3] matrix representing two original SparseTensor objects:
and
then the final SparseTensor will be:


Creates a dataset that stops iteration when predicate` is false.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.TakeWhileDataset
The predicate function must return a scalar boolean and accept the following arguments:


Computes tan of x element-wise.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.Tan
Given an input tensor, this function computes tangent of every element in the tensor. Input range is (-inf, inf) and output range is (-inf, inf). If input lies outside the boundary, nan is returned.


Computes hyperbolic tangent of x element-wise.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.Tanh
Given an input tensor, this function computes hyperbolic tangent of every element in the tensor. Input range is [-inf, inf] and output range is [-1,1].


Computes the gradient for the tanh of x wrt its input.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.TanhGrad
Specifically, grad = dy * (1 - y*y), where y = tanh(x), and dy is the corresponding input gradient.


Returns a tensor that may be mutated, but only persists within a single step.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.TemporaryVariable
This is an experimental op for internal use only and it is possible to use this op in unsafe ways. DO NOT USE unless you fully understand the risks.
It is the caller's responsibility to ensure that 'ref' is eventually passed to a matching 'DestroyTemporaryVariable' op after all other uses have completed.
Outputs a ref to the tensor state so it may be read or modified.
E.g. var = state_ops._temporaryvariable([1, 2], types.float) var_name = var.op.name var = state_ops.assign(var, [[4.0, 5.0]]) var = state_ops.assign_add(var, [[6.0, 7.0]]) final = state_ops._destroy_temporary_variable(var, var_name=var_name)


Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.TensorArray


Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.TensorArrayClose


Deprecated. Use TensorArrayCloseV3
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.TensorArrayCloseV2


Delete the TensorArray from its resource container.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.TensorArrayCloseV3
This enables the user to close and release the resource in the middle of a step/run.


Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.TensorArrayConcat


Deprecated. Use TensorArrayConcatV3
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.TensorArrayConcatV2


Concat the elements from the TensorArray into value value.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.TensorArrayConcatV3
Takes T elements of shapes
and concatenates them into a Tensor of shape:
(n0 + n1 + ... + n(T-1) x d0 x d1 x ...)
All elements must have the same shape (excepting the first dimension).


Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.TensorArrayGather


Deprecated. Use TensorArrayGatherV3
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.TensorArrayGatherV2


Gather specific elements from the TensorArray into output value.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.TensorArrayGatherV3
All elements selected by indices must have the same shape.


Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.TensorArrayGrad


Deprecated. Use TensorArrayGradV3
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.TensorArrayGradV2


Creates a TensorArray for storing the gradients of values in the given handle.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.TensorArrayGradV3
If the given TensorArray gradient already exists, returns a reference to it.
Locks the size of the original TensorArray by disabling its dynamic size flag.
A note about the input flow_in:
The handle flow_in forces the execution of the gradient lookup to occur only after certain other operations have occurred. For example, when the forward TensorArray is dynamically sized, writes to this TensorArray may resize the object. The gradient TensorArray is statically sized based on the size of the forward TensorArray when this operation executes. Furthermore, the size of the forward TensorArray is frozen by this call. As a result, the flow is used to ensure that the call to generate the gradient TensorArray only happens after all writes are executed.
In the case of dynamically sized TensorArrays, gradient computation should only be performed on read operations that have themselves been chained via flow to occur only after all writes have executed. That way the final size of the forward TensorArray is known when this operation is called.
A note about the source attribute:
TensorArray gradient calls use an accumulator TensorArray object. If multiple gradients are calculated and run in the same session, the multiple gradient nodes may accidentally flow through the same accumulator TensorArray. This double counts and generally breaks the TensorArray gradient flow.
The solution is to identify which gradient call this particular TensorArray gradient is being called in. This is performed by identifying a unique string (e.g. "gradients", "gradients_1", ...) from the input gradient Tensor's name. This string is used as a suffix when creating the TensorArray gradient object here (the attribute source).
The attribute source is added as a suffix to the forward TensorArray's name when performing the creation / lookup, so that each separate gradient calculation gets its own TensorArray accumulator.


Creates a TensorArray for storing multiple gradients of values in the given handle.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.TensorArrayGradWithShape
Similar to TensorArrayGradV3. However it creates an accumulator with an expanded shape compared to the input TensorArray whose gradient is being computed. This enables multiple gradients for the same TensorArray to be calculated using the same accumulator.


Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.TensorArrayPack


Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.TensorArrayRead


Deprecated. Use TensorArrayReadV3
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.TensorArrayReadV2


Read an element from the TensorArray into output value.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.TensorArrayReadV3


Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.TensorArrayScatter


Deprecated. Use TensorArrayScatterV3
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.TensorArrayScatterV2


Scatter the data from the input value into specific TensorArray elements.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.TensorArrayScatterV3
indices must be a vector, its length must match the first dim of value.


Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.TensorArraySize


Deprecated. Use TensorArraySizeV3
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.TensorArraySizeV2


Get the current size of the TensorArray.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.TensorArraySizeV3


Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.TensorArraySplit


Deprecated. Use TensorArraySplitV3
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.TensorArraySplitV2


Split the data from the input value into TensorArray elements.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.TensorArraySplitV3
Assuming that lengths takes on values
(n0, n1, ..., n(T-1))
and that value has shape
(n0 + n1 + ... + n(T-1) x d0 x d1 x ...),
this splits values into a TensorArray with T tensors.
TensorArray index t will be the subtensor of values with starting position
(n0 + n1 + ... + n(t-1), 0, 0, ...)
and having size
nt x d0 x d1 x ...


Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.TensorArrayUnpack


Deprecated. Use TensorArrayV3
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.TensorArrayV2


An array of Tensors of given size.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.TensorArrayV3
Write data via Write and read via Read or Pack.


Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.TensorArrayWrite


Deprecated. Use TensorArrayGradV3
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.TensorArrayWriteV2


Push an element onto the tensor_array.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.TensorArrayWriteV3


Creates a dataset that emits components as a tuple of tensors once.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.TensorDataset


Concats all tensors in the list along the 0th dimension.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.TensorListConcat
Requires that all tensors have the same shape except the first dimension.
input_handle: The input list. tensor: The concated result. lengths: Output tensor containing sizes of the 0th dimension of tensors in the list, used for computing the gradient.


Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.TensorListConcatLists


Concats all tensors in the list along the 0th dimension.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.TensorListConcatV2
Requires that all tensors have the same shape except the first dimension.
input_handle: The input list. element_shape: The shape of the uninitialized elements in the list. If the first dimension is not -1, it is assumed that all list elements have the same leading dim. leading_dims: The list of leading dims of uninitialized list elements. Used if the leading dim of input_handle.element_shape or the element_shape input arg is not already set. tensor: The concated result. lengths: Output tensor containing sizes of the 0th dimension of tensors in the list, used for computing the gradient.


The shape of the elements of the given list, as a tensor.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.TensorListElementShape
input_handle: the list element_shape: the shape of elements of the list


Creates a TensorList which, when stacked, has the value of tensor.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.TensorListFromTensor
Each tensor in the result list corresponds to one row of the input tensor.
tensor: The input tensor. output_handle: The list.


Creates a Tensor by indexing into the TensorList.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.TensorListGather
Each row in the produced Tensor corresponds to the element in the TensorList specified by the given index (see tf.gather).
input_handle: The input tensor list. indices: The indices used to index into the list. values: The tensor.


Returns the item in the list with the given index.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.TensorListGetItem
input_handle: the list index: the position in the list from which an element will be retrieved item: the element at that position


Returns the number of tensors in the input tensor list.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.TensorListLength
input_handle: the input list length: the number of tensors in the list


Returns the last element of the input list as well as a list with all but that element.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.TensorListPopBack
Fails if the list is empty.
input_handle: the input list tensor: the withdrawn last element of the list element_dtype: the type of elements in the list element_shape: the shape of the output tensor


Returns a list which has the passed-in Tensor as last element and the other elements of the given list in input_handle.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.TensorListPushBack
tensor: The tensor to put on the list. input_handle: The old list. output_handle: A list with the elements of the old list followed by tensor. element_dtype: the type of elements in the list. element_shape: a shape compatible with that of elements in the list.


Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.TensorListPushBackBatch


List of the given size with empty elements.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.TensorListReserve
element_shape: the shape of the future elements of the list num_elements: the number of elements to reserve handle: the output list element_dtype: the desired type of elements in the list.


Resizes the list.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.TensorListResize
input_handle: the input list size: size of the output list


Creates a TensorList by indexing into a Tensor.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.TensorListScatter
Each member of the TensorList corresponds to one row of the input tensor, specified by the given index (see tf.gather).
tensor: The input tensor. indices: The indices used to index into the list. element_shape: The shape of the elements in the list (can be less specified than the shape of the tensor). output_handle: The TensorList.


Scatters tensor at indices in an input list.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.TensorListScatterIntoExistingList
Each member of the TensorList corresponds to one row of the input tensor, specified by the given index (see tf.gather).
input_handle: The list to scatter into. tensor: The input tensor. indices: The indices used to index into the list. output_handle: The TensorList.


Creates a TensorList by indexing into a Tensor.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.TensorListScatterV2
Each member of the TensorList corresponds to one row of the input tensor, specified by the given index (see tf.gather).
tensor: The input tensor. indices: The indices used to index into the list. element_shape: The shape of the elements in the list (can be less specified than the shape of the tensor). num_elements: The size of the output list. Must be large enough to accommodate the largest index in indices. If -1, the list is just large enough to include the largest index in indices. output_handle: The TensorList.


Sets the index-th position of the list to contain the given tensor.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.TensorListSetItem
input_handle: the list index: the position in the list to which the tensor will be assigned item: the element to be assigned to that position output_handle: the new list, with the element in the proper position


Splits a tensor into a list.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.TensorListSplit
list[i] corresponds to lengths[i] tensors from the input tensor. The tensor must have rank at least 1 and contain exactly sum(lengths) elements.
tensor: The input tensor. element_shape: A shape compatible with that of elements in the tensor. lengths: Vector of sizes of the 0th dimension of tensors in the list. output_handle: The list.


Stacks all tensors in the list.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.TensorListStack
Requires that all tensors have the same shape.
input_handle: the input list tensor: the gathered result num_elements: optional. If not -1, the number of elements in the list.


Adds sparse updates to an existing tensor according to indices.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.TensorScatterAdd
This operation creates a new tensor by adding sparse updates to the passed in tensor. This operation is very similar to tf.scatter_nd_add, except that the updates are added onto an existing tensor (as opposed to a variable). If the memory for the existing tensor cannot be re-used, a copy is made and updated.
indices is an integer tensor containing indices into a new tensor of shape tensor.shape. The last dimension of indices can be at most the rank of tensor.shape:
The last dimension of indices corresponds to indices into elements (if indices.shape[-1] = tensor.shape.rank) or slices (if indices.shape[-1] < tensor.shape.rank) along dimension indices.shape[-1] of tensor.shape. updates is a tensor with shape
The simplest form of tensor_scatter_add is to add individual elements to a tensor by index. For example, say we want to add 4 elements in a rank-1 tensor with 8 elements.
In Python, this scatter add operation would look like this:
The resulting tensor would look like this:
We can also, insert entire slices of a higher rank tensor all at once. For example, if we wanted to insert two slices in the first dimension of a rank-3 tensor with two matrices of new values.
In Python, this scatter add operation would look like this:
The resulting tensor would look like this:
Note that on CPU, if an out of bound index is found, an error is returned. On GPU, if an out of bound index is found, the index is ignored.


Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.TensorScatterMax


Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.TensorScatterMin


Subtracts sparse updates from an existing tensor according to indices.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.TensorScatterSub
This operation creates a new tensor by subtracting sparse updates from the passed in tensor. This operation is very similar to tf.scatter_nd_sub, except that the updates are subtracted from an existing tensor (as opposed to a variable). If the memory for the existing tensor cannot be re-used, a copy is made and updated.
indices is an integer tensor containing indices into a new tensor of shape shape. The last dimension of indices can be at most the rank of shape:
The last dimension of indices corresponds to indices into elements (if indices.shape[-1] = shape.rank) or slices (if indices.shape[-1] < shape.rank) along dimension indices.shape[-1] of shape. updates is a tensor with shape
The simplest form of tensor_scatter_sub is to subtract individual elements from a tensor by index. For example, say we want to insert 4 scattered elements in a rank-1 tensor with 8 elements.
In Python, this scatter subtract operation would look like this:
The resulting tensor would look like this:
We can also, insert entire slices of a higher rank tensor all at once. For example, if we wanted to insert two slices in the first dimension of a rank-3 tensor with two matrices of new values.
In Python, this scatter add operation would look like this:
The resulting tensor would look like this:
Note that on CPU, if an out of bound index is found, an error is returned. On GPU, if an out of bound index is found, the index is ignored.


Scatter updates into an existing tensor according to indices.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.TensorScatterUpdate
This operation creates a new tensor by applying sparse updates to the passed in tensor. This operation is very similar to tf.scatter_nd, except that the updates are scattered onto an existing tensor (as opposed to a zero-tensor). If the memory for the existing tensor cannot be re-used, a copy is made and updated.
If indices contains duplicates, then we pick the last update for the index.
If an out of bound index is found on CPU, an error is returned.
indices is an integer tensor containing indices into a new tensor of shape shape.
if indices.shape[-1] = tensor.rank this Op indexes and updates scalar elements. if indices.shape[-1] < tensor.rank it indexes and updates slices of the input tensor.
Each update has a rank of tensor.rank - indices.shape[-1]. The overall shape of updates is:
For usage examples see the python tf.tensor_scatter_nd_update function


Creates a dataset that emits each dim-0 slice of components once.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.TensorSliceDataset


Assign value to the sliced l-value reference of input.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.TensorStridedSliceUpdate
The values of value are assigned to the positions in the tensor input that are selected by the slice parameters. The slice parameters begin end strides etc. work exactly as in StridedSlice.
NOTE this op currently does not support broadcasting and so value's shape must be exactly the shape produced by the slice of input.


Outputs a Summary protocol buffer with a tensor.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.TensorSummary
This op is being phased out in favor of TensorSummaryV2, which lets callers pass a tag as well as a serialized SummaryMetadata proto string that contains plugin-specific data. We will keep this op to maintain backwards compatibility.


Outputs a Summary protocol buffer with a tensor and per-plugin data.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.TensorSummaryV2


Creates a dataset that emits the lines of one or more text files.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.TextLineDataset


A Reader that outputs the lines of a file delimited by '\n'.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.TextLineReader


A Reader that outputs the lines of a file delimited by '\n'.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.TextLineReaderV2


Creates a dataset that emits the records from one or more TFRecord files.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.TFRecordDataset


A Reader that outputs the records from a TensorFlow Records file.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.TFRecordReader