Computes Quantized Rectified Linear: max(features, 0)
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.QuantizedRelu


Computes Quantized Rectified Linear 6: min(max(features, 0), 6)
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.QuantizedRelu6


Computes Quantized Rectified Linear X: min(max(features, 0), max_value)
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.QuantizedReluX


Reshapes a quantized tensor as per the Reshape op.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.QuantizedReshape


Resize quantized images to size using quantized bilinear interpolation.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.QuantizedResizeBilinear
Input images and output images must be quantized types.


Quantize the 'input' tensor of type float to 'output' tensor of type 'T'.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.QuantizeV2
[min_range, max_range] are scalar floats that specify the range for the 'input' data. The 'mode' attribute controls exactly which calculations are used to convert the float values to their quantized equivalents. The 'round_mode' attribute controls which rounding tie-breaking algorithm is used when rounding float values to their quantized equivalents.
In 'MIN_COMBINED' mode, each value of the tensor will undergo the following:
here range(T) = numeric_limits<T>::max() - numeric_limits<T>::min()
MIN_COMBINED Mode Example
Assume the input is type float and has a possible range of [0.0, 6.0] and the output type is quint8 ([0, 255]). The min_range and max_range values should be specified as 0.0 and 6.0. Quantizing from float to quint8 will multiply each value of the input by 255/6 and cast to quint8.
If the output type was qint8 ([-128, 127]), the operation will additionally subtract each value by 128 prior to casting, so that the range of values aligns with the range of qint8.
If the mode is 'MIN_FIRST', then this approach is used:
The biggest difference between this and MIN_COMBINED is that the minimum range is rounded first, before it's subtracted from the rounded value. With MIN_COMBINED, a small bias is introduced where repeated iterations of quantizing and dequantizing will introduce a larger and larger error.
SCALED mode Example
SCALED mode matches the quantization approach used in QuantizeAndDequantize{V2|V3}.
If the mode is SCALED, the quantization is performed by multiplying each input value by a scaling_factor. The scaling_factor is determined from min_range and max_range to be as large as possible such that the range from min_range to max_range is representable within values of type T.
We next use the scale_factor to adjust min_range and max_range as follows:
e.g. if T = qint8, and initially min_range = -10, and max_range = 9, we would compare -128/-10.0 = 12.8 to 127/9.0 = 14.11, and set scaling_factor = 12.8 In this case, min_range would remain -10, but max_range would be adjusted to 127 / 12.8 = 9.921875
So we will quantize input values in the range (-10, 9.921875) to (-128, 127).
The input tensor can now be quantized by clipping values to the range min_range to max_range, then multiplying by scale_factor as follows:
The adjusted min_range and max_range are returned as outputs 2 and 3 of this operation. These outputs should be used as the range for any further calculations.
narrow_range (bool) attribute
If true, we do not use the minimum quantized value. i.e. for int8 the quantized output, it would be restricted to the range -127..127 instead of the full -128..127 range. This is provided for compatibility with certain inference backends. (Only applies to SCALED mode)
axis (int) attribute
An optional axis attribute can specify a dimension index of the input tensor, such that quantization ranges will be calculated and applied separately for each slice of the tensor along that dimension. This is useful for per-channel quantization.
If axis is specified, min_range and max_range
if axis=None, per-tensor quantization is performed as normal.
ensure_minimum_range (float) attribute
Ensures the minimum quantization range is at least this value. The legacy default value for this is 0.01, but it is strongly suggested to set it to 0 for new uses.


Closes the given queue.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.QueueClose
This operation signals that no more elements will be enqueued in the given queue. Subsequent Enqueue(Many) operations will fail. Subsequent Dequeue(Many) operations will continue to succeed if sufficient elements remain in the queue. Subsequent Dequeue(Many) operations that would block will fail immediately.


Closes the given queue.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.QueueCloseV2
This operation signals that no more elements will be enqueued in the given queue. Subsequent Enqueue(Many) operations will fail. Subsequent Dequeue(Many) operations will continue to succeed if sufficient elements remain in the queue. Subsequent Dequeue(Many) operations that would block will fail immediately.


Dequeues a tuple of one or more tensors from the given queue.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.QueueDequeue
This operation has k outputs, where k is the number of components in the tuples stored in the given queue, and output i is the ith component of the dequeued tuple.
N.B. If the queue is empty, this operation will block until an element has been dequeued (or 'timeout_ms' elapses, if specified).


Dequeues n tuples of one or more tensors from the given queue.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.QueueDequeueMany
If the queue is closed and there are fewer than n elements, then an OutOfRange error is returned.
This operation concatenates queue-element component tensors along the 0th dimension to make a single component tensor. All of the components in the dequeued tuple will have size n in the 0th dimension.
This operation has k outputs, where k is the number of components in the tuples stored in the given queue, and output i is the ith component of the dequeued tuple.
N.B. If the queue is empty, this operation will block until n elements have been dequeued (or 'timeout_ms' elapses, if specified).


Dequeues n tuples of one or more tensors from the given queue.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.QueueDequeueManyV2
If the queue is closed and there are fewer than n elements, then an OutOfRange error is returned.
This operation concatenates queue-element component tensors along the 0th dimension to make a single component tensor. All of the components in the dequeued tuple will have size n in the 0th dimension.
This operation has k outputs, where k is the number of components in the tuples stored in the given queue, and output i is the ith component of the dequeued tuple.
N.B. If the queue is empty, this operation will block until n elements have been dequeued (or 'timeout_ms' elapses, if specified).


Dequeues n tuples of one or more tensors from the given queue.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.QueueDequeueUpTo
This operation is not supported by all queues. If a queue does not support DequeueUpTo, then an Unimplemented error is returned.
If the queue is closed and there are more than 0 but less than n elements remaining, then instead of returning an OutOfRange error like QueueDequeueMany, less than n elements are returned immediately. If the queue is closed and there are 0 elements left in the queue, then an OutOfRange error is returned just like in QueueDequeueMany. Otherwise the behavior is identical to QueueDequeueMany:
This operation concatenates queue-element component tensors along the 0th dimension to make a single component tensor. All of the components in the dequeued tuple will have size n in the 0th dimension.
This operation has k outputs, where k is the number of components in the tuples stored in the given queue, and output i is the ith component of the dequeued tuple.


Dequeues n tuples of one or more tensors from the given queue.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.QueueDequeueUpToV2
This operation is not supported by all queues. If a queue does not support DequeueUpTo, then an Unimplemented error is returned.
If the queue is closed and there are more than 0 but less than n elements remaining, then instead of returning an OutOfRange error like QueueDequeueMany, less than n elements are returned immediately. If the queue is closed and there are 0 elements left in the queue, then an OutOfRange error is returned just like in QueueDequeueMany. Otherwise the behavior is identical to QueueDequeueMany:
This operation concatenates queue-element component tensors along the 0th dimension to make a single component tensor. All of the components in the dequeued tuple will have size n in the 0th dimension.
This operation has k outputs, where k is the number of components in the tuples stored in the given queue, and output i is the ith component of the dequeued tuple.


Dequeues a tuple of one or more tensors from the given queue.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.QueueDequeueV2
This operation has k outputs, where k is the number of components in the tuples stored in the given queue, and output i is the ith component of the dequeued tuple.
N.B. If the queue is empty, this operation will block until an element has been dequeued (or 'timeout_ms' elapses, if specified).


Enqueues a tuple of one or more tensors in the given queue.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.QueueEnqueue
The components input has k elements, which correspond to the components of tuples stored in the given queue.
N.B. If the queue is full, this operation will block until the given element has been enqueued (or 'timeout_ms' elapses, if specified).


Enqueues zero or more tuples of one or more tensors in the given queue.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.QueueEnqueueMany
This operation slices each component tensor along the 0th dimension to make multiple queue elements. All of the tuple components must have the same size in the 0th dimension.
The components input has k elements, which correspond to the components of tuples stored in the given queue.
N.B. If the queue is full, this operation will block until the given elements have been enqueued (or 'timeout_ms' elapses, if specified).


Enqueues zero or more tuples of one or more tensors in the given queue.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.QueueEnqueueManyV2
This operation slices each component tensor along the 0th dimension to make multiple queue elements. All of the tuple components must have the same size in the 0th dimension.
The components input has k elements, which correspond to the components of tuples stored in the given queue.
N.B. If the queue is full, this operation will block until the given elements have been enqueued (or 'timeout_ms' elapses, if specified).


Enqueues a tuple of one or more tensors in the given queue.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.QueueEnqueueV2
The components input has k elements, which correspond to the components of tuples stored in the given queue.
N.B. If the queue is full, this operation will block until the given element has been enqueued (or 'timeout_ms' elapses, if specified).


Returns true if queue is closed.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.QueueIsClosed
This operation returns true if the queue is closed and false if the queue is open.


Returns true if queue is closed.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.QueueIsClosedV2
This operation returns true if the queue is closed and false if the queue is open.


Computes the number of elements in the given queue.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.QueueSize


Computes the number of elements in the given queue.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.QueueSizeV2


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.RaggedBincount
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.


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


Generates a feature cross from a list of tensors, and returns it as a
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.RaggedCross
RaggedTensor. See tf.ragged.cross for more details.
Args: ragged_values: A list of Tensor objects with types from: int64, string. The values tensor for each RaggedTensor input. ragged_row_splits: A list of Tensor objects with types from: int32, int64. The row_splits tensor for each RaggedTensor input. sparse_indices: A list of Tensor objects with type int64. The indices tensor for each SparseTensor input. sparse_values: A list of Tensor objects with types from: int64, string. The values tensor for each SparseTensor input. sparse_shape: A list with the same length as sparse_indices of Tensor objects with type int64. The dense_shape tensor for each SparseTensor input. dense_inputs: A list of Tensor objects with types from: int64, string. The tf.Tensor inputs. input_order: A string. String specifying the tensor type for each input. The ith character in this string specifies the type of the ith input, and is one of: 'R' (ragged), 'D' (dense), or 'S' (sparse). This attr is used to ensure that the crossed values are combined in the order of the inputs from the call to tf.ragged.cross. hashed_output: A bool. num_buckets: An int that is >= 0. hash_key: An int. out_values_type: A tf.DType from: tf.int64, tf.string. out_row_splits_type: A tf.DType from: tf.int32, tf.int64. name: A name for the operation (optional).
Returns: A tuple of Tensor objects (output_values, output_row_splits).


Gather ragged slices from params axis 0 according to indices.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.RaggedGather
Outputs a RaggedTensor output composed from output_dense_values and output_nested_splits, such that:
where
(Note: This c++ op is used to implement the higher-level python tf.ragged.gather op, which also supports ragged indices.)


Returns a RaggedTensor containing the specified sequences of numbers.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.RaggedRange
Returns a RaggedTensor result composed from rt_dense_values and rt_nested_splits, such that result[i] = range(starts[i], limits[i], deltas[i]).
The input tensors starts, limits, and deltas may be scalars or vectors. The vector inputs must all have the same size. Scalar inputs are broadcast to match the size of the vector inputs.


Decodes a variant Tensor into a RaggedTensor.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.RaggedTensorFromVariant
Decodes the given variant Tensor and returns a RaggedTensor. The input could be a scalar, meaning it encodes a single RaggedTensor with ragged_rank output_ragged_rank. It could also have an arbitrary rank, in which case each element is decoded into a RaggedTensor with ragged_rank input_ragged_rank and these are then stacked according to the input shape to output a single RaggedTensor with ragged_rank output_ragged_rank. Each variant element in the input Tensor is decoded by retrieving from the element a 1-D variant Tensor with input_ragged_rank + 1 Tensors, corresponding to the splits and values of the decoded RaggedTensor. If input_ragged_rank is -1, then it is inferred as output_ragged_rank - rank(encoded_ragged). See RaggedTensorToVariant for the corresponding encoding logic.


Converts a RaggedTensor into a SparseTensor with the same values.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.RaggedTensorToSparse
input=ragged.from_nested_row_splits(rt_dense_values, rt_nested_splits) output=SparseTensor(indices=sparse_indices, values=sparse_values, dense_shape=sparse_dense_shape)


Create a dense tensor from a ragged tensor, possibly altering its shape.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.RaggedTensorToTensor
The ragged_to_dense op creates a dense tensor from a list of row partition tensors, a value vector, and default values. If the shape is unspecified, the minimal shape required to contain all the elements in the ragged tensor (the natural shape) will be used. If some dimensions are left unspecified, then the size of the natural shape is used in that dimension.
The default_value will be broadcast to the output shape. After that, the values from the ragged tensor overwrite the default values. Note that the default_value must have less dimensions than the value.
The row partition tensors are in the order of the dimensions. At present, the types can be:
Note that dense dimensions cannot be modified by the shape argument. Trying to change the size of a dense dimension will cause the op to fail. Examples: natural shape: [4, 5, 6] shape: -1 output shape: [4, 5, 6]
natural shape: [4, 5, 6] shape: [3, -1, 2] output shape: [3, 5, 2]
natural shape: [4, 5, 6] shape: [3, 7, 2] output shape: [3, 7, 2]


Encodes a RaggedTensor into a variant Tensor.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.RaggedTensorToVariant
Encodes the given RaggedTensor and returns a variant Tensor. If batched_input is True, then input RaggedTensor is unbatched along the zero-th dimension, each component RaggedTensor is encoded into a scalar variant Tensor, and these are stacked to return a 1-D variant Tensor. If batched_input is False, then the input RaggedTensor is encoded as is and a scalar variant Tensor is returned. A RaggedTensor is encoded by first creating a 1-D variant Tensor with ragged_rank + 1 elements, containing the splits and values Tensors of the RaggedTensor. Then the 1-D variant Tensor is wrapped in a scalar variant Tensor. See RaggedTensorFromVariant for the corresponding decoding logic.


Helper used to compute the gradient for RaggedTensorToVariant.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.RaggedTensorToVariantGradient
Computes the gradient for the dense_values input to the RaggedTensorToVariant op, given the variant-encoded ragged gradients of the outputs, along with the outer row-splits and the shape of the dense-values that were provided as inputs to the RaggedTensorToVariant op.


Randomly crop image.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.RandomCrop
size is a 1-D int64 tensor with 2 elements representing the crop height and width. The values must be non negative.
This Op picks a random location in image and crops a height by width rectangle from that location. The random location is picked so the cropped area will fit inside the original image.


Creates a Dataset that returns pseudorandom numbers.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.RandomDataset
Creates a Dataset that returns a stream of uniformly distributed pseudorandom 64-bit signed integers.
In the TensorFlow Python API, you can instantiate this dataset via the class tf.data.experimental.RandomDataset.
Instances of this dataset are also created as a result of the hoist_random_uniform static optimization. Whether this optimization is performed is determined by the experimental_optimization.hoist_random_uniform option of tf.data.Options.


Outputs random values from the Gamma distribution(s) described by alpha.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.RandomGamma
This op uses the algorithm by Marsaglia et al. to acquire samples via transformation-rejection from pairs of uniform and normal random variables. See http://dl.acm.org/citation.cfm?id=358414


Computes the derivative of a Gamma random sample w.r.t. alpha.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.RandomGammaGrad


Use RandomPoissonV2 instead.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.RandomPoisson


Outputs random values from the Poisson distribution(s) described by rate.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.RandomPoissonV2
This op uses two algorithms, depending on rate. If rate >= 10, then the algorithm by Hormann is used to acquire samples via transformation-rejection. See http://www.sciencedirect.com/science/article/pii/0167668793909974
Otherwise, Knuth's algorithm is used to acquire samples via multiplying uniform random variables. See Donald E. Knuth (1969). Seminumerical Algorithms. The Art of Computer Programming, Volume 2. Addison Wesley


Randomly shuffles a tensor along its first dimension.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.RandomShuffle
The tensor is shuffled along dimension 0, such that each value[j] is mapped to one and only one output[i]. For example, a mapping that might occur for a 3x2 tensor is:


A queue that randomizes the order of elements.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.RandomShuffleQueue


A queue that randomizes the order of elements.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.RandomShuffleQueueV2


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


Outputs random values from a uniform distribution.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.RandomUniform
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.RandomUniformInt
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).


Creates a sequence of numbers.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.Range
This operation creates a sequence of numbers that begins at start and extends by increments of delta up to but not including limit.


Creates a dataset with a range of values. Corresponds to python's xrange.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.RangeDataset


Returns the rank of a tensor.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.Rank
This operation returns an integer representing the rank of input.


Returns the number of records this Reader has produced.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ReaderNumRecordsProduced
This is the same as the number of ReaderRead executions that have succeeded.


Returns the number of records this Reader has produced.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ReaderNumRecordsProducedV2
This is the same as the number of ReaderRead executions that have succeeded.


Returns the number of work units this Reader has finished processing.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ReaderNumWorkUnitsCompleted


Returns the number of work units this Reader has finished processing.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ReaderNumWorkUnitsCompletedV2


Returns the next record (key, value pair) produced by a Reader.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ReaderRead
Will dequeue from the input queue if necessary (e.g. when the Reader needs to start reading from a new file since it has finished with the previous file).


Returns up to num_records (key, value) pairs produced by a Reader.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ReaderReadUpTo
Will dequeue from the input queue if necessary (e.g. when the Reader needs to start reading from a new file since it has finished with the previous file). It may return less than num_records even before the last batch.


Returns up to num_records (key, value) pairs produced by a Reader.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ReaderReadUpToV2
Will dequeue from the input queue if necessary (e.g. when the Reader needs to start reading from a new file since it has finished with the previous file). It may return less than num_records even before the last batch.


Returns the next record (key, value pair) produced by a Reader.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ReaderReadV2
Will dequeue from the input queue if necessary (e.g. when the Reader needs to start reading from a new file since it has finished with the previous file).


Restore a Reader to its initial clean state.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ReaderReset


Restore a Reader to its initial clean state.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ReaderResetV2


Restore a reader to a previously saved state.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ReaderRestoreState
Not all Readers support being restored, so this can produce an Unimplemented error.


Restore a reader to a previously saved state.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ReaderRestoreStateV2
Not all Readers support being restored, so this can produce an Unimplemented error.


Produce a string tensor that encodes the state of a Reader.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ReaderSerializeState
Not all Readers support being serialized, so this can produce an Unimplemented error.


Produce a string tensor that encodes the state of a Reader.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ReaderSerializeStateV2
Not all Readers support being serialized, so this can produce an Unimplemented error.


Reads and outputs the entire contents of the input filename.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ReadFile


Reads the value of a variable.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ReadVariableOp
The tensor returned by this operation is immutable.
The value returned by this operation is guaranteed to be influenced by all the writes on which this operation depends directly or indirectly, and to not be influenced by any of the writes which depend directly or indirectly on this operation.


Returns the real part of a complex number.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.Real
Given a tensor input of complex numbers, this operation returns a tensor of type float that is the real part of each element in input. All elements in input must be complex numbers of the form \(a + bj\), where a is the real part returned by this operation and b is the imaginary part.


Returns x / y element-wise for real types.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.RealDiv
If x and y are reals, this will return the floating-point division.


Creates a dataset that changes the batch size.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.RebatchDataset
Creates a dataset that changes the batch size of the dataset to current batch size // num_workers.


Creates a dataset that changes the batch size.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.RebatchDatasetV2
Creates a dataset that rebatches elements from input_dataset into new batch sizes.


Computes the reciprocal of x element-wise.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.Reciprocal
I.e., \(y = 1 / x\).


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


Emits randomized records.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.RecordInput


Receives the named tensor from send_device on recv_device.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.Recv


An op that receives embedding activations on the TPU.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.RecvTPUEmbeddingActivations
The TPU system performs the embedding lookups and aggregations specified by the arguments to TPUEmbeddingEnqueue(Integer/Sparse/SparseTensor)Batch. The results of these aggregations are visible to the Tensorflow Graph as the outputs of a RecvTPUEmbeddingActivations op. This op returns a list containing one Tensor of activations per table specified in the model. There can be at most one RecvTPUEmbeddingActivations op in the TPU graph.


Reduces the input dataset to a singleton using a reduce function.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ReduceDataset


Joins a string Tensor across the given dimensions.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ReduceJoin
Computes the string join across dimensions in the given string Tensor of shape [\\(d_0, d_1, ..., d_{n-1}\\)]. Returns a new Tensor created by joining the input strings with the given separator (default: empty string). Negative indices are counted backwards from the end, with -1 being equivalent to n - 1. If indices are not specified, joins across all dimensions beginning from n - 1 through 0.


Creates or finds a child frame, and makes data available to the child frame.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.RefEnter
The unique frame_name is used by the Executor to identify frames. If is_constant is true, output is a constant in the child frame; otherwise it may be changed in the child frame. At most parallel_iterations iterations are run in parallel in the child frame.


Exits the current frame to its parent frame.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.RefExit
Exit makes its input data available to the parent frame.


Return the same ref tensor as the input ref tensor.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.RefIdentity


Forwards the value of an available tensor from inputs to output.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.RefMerge
Merge waits for at least one of the tensors in inputs to become available. It is usually combined with Switch to implement branching.
Merge forwards the first tensor for become available to output, and sets value_index to its index in inputs.


Makes its input available to the next iteration.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.RefNextIteration


Forwards the indexth element of inputs to output.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.RefSelect


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


Check if the input matches the regex pattern.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.RegexFullMatch
The input is a string tensor of any shape. The pattern is a scalar string tensor which is applied to 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 matches of the pattern regular expression in input with the
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.RegexReplace
replacement string provided in rewrite.
It follows the re2 syntax (https://github.com/google/re2/wiki/Syntax)
Args: input: A Tensor of type string. The text to be processed. pattern: A Tensor of type string. The regular expression to be matched in the input strings. rewrite: A Tensor of type string. The rewrite string to be substituted for the pattern expression where it is matched in the input strings. replace_global: An optional bool. Defaults to True. If True, the replacement is global (that is, all matches of the pattern regular expression in each input string are rewritten), otherwise the rewrite substitution is only made for the first pattern match. name: A name for the operation (optional).
Returns: A Tensor of type string.


Registers a dataset with the tf.data service.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.RegisterDataset


Computes rectified linear: max(features, 0).
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.Relu
See: https://en.wikipedia.org/wiki/Rectifier_(neural_networks) Example usage:


Computes rectified linear 6: min(max(features, 0), 6).
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.Relu6


Computes rectified linear 6 gradients for a Relu6 operation.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.Relu6Grad


Computes rectified linear gradients for a Relu operation.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ReluGrad


Runs function f on a remote device indicated by target.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.RemoteCall


Creates a dataset that emits the outputs of input_dataset count times.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.RepeatDataset


Computes a range that covers the actual values present in a quantized tensor.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.RequantizationRange
Given a quantized tensor described by (input, input_min, input_max), outputs a range that covers the actual values present in that tensor. This op is typically used to produce the requested_output_min and requested_output_max for Requantize.


Computes requantization range per channel.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.RequantizationRangePerChannel


Converts the quantized input tensor into a lower-precision output.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.Requantize
Converts the quantized input tensor into a lower-precision output, using the output range specified with requested_output_min and requested_output_max.
[input_min, input_max] are scalar floats that specify the range for the float interpretation of the input data. For example, if input_min is -1.0f and input_max is 1.0f, and we are dealing with quint16 quantized data, then a 0 value in the 16-bit data should be interpreted as -1.0f, and a 65535 means 1.0f.


Requantizes input with min and max values known per channel.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.RequantizePerChannel


Reshapes a tensor.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.Reshape
Given tensor, this operation returns a tensor that has the same values as tensor with shape shape.
If one component of 1-D tensor shape is the special value -1, the size of that dimension is computed so that the total size remains constant. In particular, a shape of [-1] flattens into 1-D. At most one component of shape may be unknown.
The shape must be 1-D and the operation returns a tensor with shape shape filled with the values of tensor. In this case, the number of elements implied by shape must be the same as the number of elements in tensor.
It is an error if shape is not 1-D.


Resize images to size using area interpolation.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ResizeArea
Input images can be of different types but output images are always float.
The range of pixel values for the output image might be slightly different from the range for the input image because of limited numerical precision. To guarantee an output range, for example [0.0, 1.0], apply tf.clip_by_value to the output.
Each output pixel is computed by first transforming the pixel's footprint into the input tensor and then averaging the pixels that intersect the footprint. An input pixel's contribution to the average is weighted by the fraction of its area that intersects the footprint. This is the same as OpenCV's INTER_AREA.


Resize images to size using bicubic interpolation.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ResizeBicubic
Input images can be of different types but output images are always float.


Computes the gradient of bicubic interpolation.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ResizeBicubicGrad


Resize images to size using bilinear interpolation.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ResizeBilinear
Input images can be of different types but output images are always float.


Computes the gradient of bilinear interpolation.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ResizeBilinearGrad


Resize images to size using nearest neighbor interpolation.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ResizeNearestNeighbor


Computes the gradient of nearest neighbor interpolation.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ResizeNearestNeighborGrad


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


Returns the number of gradients aggregated in the given accumulators.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ResourceAccumulatorNumAccumulated


Updates the accumulator with a new value for global_step.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ResourceAccumulatorSetGlobalStep
Logs warning if the accumulator's value is already higher than new_global_step.


Extracts the average gradient in the given ConditionalAccumulator.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ResourceAccumulatorTakeGradient
The op 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 returns the average of the accumulated gradients. Also automatically increments the recorded global_step in the accumulator by 1, and resets the aggregate to 0.


Update '*var' according to the adadelta scheme.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ResourceApplyAdadelta
accum = rho() * accum + (1 - rho()) * grad.square(); update = (update_accum + epsilon).sqrt() * (accum + epsilon()).rsqrt() * grad; update_accum = rho() * update_accum + (1 - rho()) * update.square(); var -= update;


Update '*var' according to the adagrad scheme.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ResourceApplyAdagrad
accum += grad * grad var -= lr * grad * (1 / sqrt(accum))


Update '*var' according to the proximal adagrad scheme.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ResourceApplyAdagradDA


Update '*var' according to the adagrad scheme.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ResourceApplyAdagradV2
accum += grad * grad var -= lr * grad * (1 / (sqrt(accum) + epsilon))


Update '*var' according to the Adam algorithm.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ResourceApplyAdam


Update '*var' according to the AdaMax algorithm.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ResourceApplyAdaMax
mt <- beta1 * m{t-1} + (1 - beta1) * g vt <- max(beta2 * v{t-1}, abs(g)) variable <- variable - learning_rate / (1 - beta1^t) * m_t / (v_t + epsilon)


Update '*var' according to the Adam algorithm.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ResourceApplyAdamWithAmsgrad


Update '*var' according to the AddSign update.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ResourceApplyAddSign
mt <- beta1 * m{t-1} + (1 - beta1) * g update <- (alpha + sign_decay * sign(g) *sign(m)) * g variable <- variable - lr_t * update


Update '*var' according to the centered RMSProp algorithm.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ResourceApplyCenteredRMSProp
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)
mg <- rho * mg{t-1} + (1-rho) * grad ms <- rho * ms{t-1} + (1-rho) * grad * grad mom <- momentum * mom_{t-1} + lr * grad / sqrt(ms - mg * mg + epsilon) var <- var - mom


Update '*var' according to the Ftrl-proximal scheme.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ResourceApplyFtrl
accum_new = accum + grad * grad linear += grad - (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 '*var' according to the Ftrl-proximal scheme.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ResourceApplyFtrlV2
grad_with_shrinkage = grad + 2 * l2_shrinkage * var accum_new = accum + grad_with_shrinkage * grad_with_shrinkage 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 '*var' by subtracting 'alpha' * 'delta' from it.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ResourceApplyGradientDescent


Update '*var' according to the momentum scheme.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ResourceApplyKerasMomentum
Set use_nesterov = True if you want to use Nesterov momentum.
accum = accum * momentum - lr * grad var += accum


Update '*var' according to the momentum scheme.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ResourceApplyMomentum
Set use_nesterov = True if you want to use Nesterov momentum.
accum = accum * momentum + grad var -= lr * accum


Update '*var' according to the AddSign update.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ResourceApplyPowerSign
mt <- beta1 * m{t-1} + (1 - beta1) * g update <- exp(logbase * sign_decay * sign(g) * sign(m_t)) * g variable <- variable - lr_t * update


Update 'var' and 'accum' according to FOBOS with Adagrad learning rate.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ResourceApplyProximalAdagrad
accum += grad * grad prox_v = var - lr * grad * (1 / sqrt(accum)) var = sign(prox_v)/(1+lr*l2) * max{|prox_v|-lr*l1,0}


Update '*var' as FOBOS algorithm with fixed learning rate.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ResourceApplyProximalGradientDescent
prox_v = var - alpha * delta var = sign(prox_v)/(1+alpha*l2) * max{|prox_v|-alpha*l1,0}


Update '*var' according to the RMSProp algorithm.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ResourceApplyRMSProp
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)
ms <- rho * ms{t-1} + (1-rho) * grad * grad mom <- momentum * mom{t-1} + lr * grad / sqrt(ms + epsilon) var <- var - mom


A conditional accumulator for aggregating gradients.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ResourceConditionalAccumulator
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. This is a resource version of ConditionalAccumulator that will work in TF2.0 with tf.cond version 2.


Increments variable pointed to by 'resource' until it reaches 'limit'.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ResourceCountUpTo


Gather slices from the variable pointed to by resource according to indices.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ResourceGather
indices must be an integer tensor of any dimension (usually 0-D or 1-D). Produces an output tensor with shape indices.shape + params.shape[1:] where:


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


Adds sparse updates to the variable referenced by resource.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ResourceScatterAdd
This operation computes
Duplicate entries are handled correctly: if multiple indices reference the same location, their contributions add.
Requires updates.shape = indices.shape + ref.shape[1:] or updates.shape = [].


Divides sparse updates into the variable referenced by resource.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ResourceScatterDiv
This operation computes
Duplicate entries are handled correctly: if multiple indices reference the same location, their contributions multiply.
Requires updates.shape = indices.shape + ref.shape[1:] or updates.shape = [].


Reduces sparse updates into the variable referenced by resource using the max operation.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ResourceScatterMax
This operation computes
Duplicate entries are handled correctly: if multiple indices reference the same location, their contributions are combined.
Requires updates.shape = indices.shape + ref.shape[1:] or updates.shape = [].


Reduces sparse updates into the variable referenced by resource using the min operation.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ResourceScatterMin
This operation computes
Duplicate entries are handled correctly: if multiple indices reference the same location, their contributions are combined.
Requires updates.shape = indices.shape + ref.shape[1:] or updates.shape = [].


Multiplies sparse updates into the variable referenced by resource.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ResourceScatterMul
This operation computes
Duplicate entries are handled correctly: if multiple indices reference the same location, their contributions multiply.
Requires updates.shape = indices.shape + ref.shape[1:] or updates.shape = [].


Applies sparse addition to individual values or slices in a Variable.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ResourceScatterNdAdd
ref is a Tensor with rank P and indices is a Tensor of rank Q.
indices must be integer tensor, containing indices into ref. It must be shape [d_0, ..., d_{Q-2}, K] where 0 < K <= P.
The innermost dimension of indices (with length K) corresponds to indices into elements (if K = P) or slices (if K < P) along the Kth dimension of ref.
updates is Tensor of rank Q-1+P-K with shape:
For example, say we want to add 4 scattered elements to a rank-1 tensor to 8 elements. In Python, that addition would look like this:
The resulting update to ref would look like this:
See tf.scatter_nd for more details about how to make updates to slices.


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


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


Applies sparse subtraction to individual values or slices in a Variable.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ResourceScatterNdSub
ref is a Tensor with rank P and indices is a Tensor of rank Q.
indices must be integer tensor, containing indices into ref. It must be shape [d_0, ..., d_{Q-2}, K] where 0 < K <= P.
The innermost dimension of indices (with length K) corresponds to indices into elements (if K = P) or slices (if K < P) along the Kth dimension of ref.
updates is Tensor of rank Q-1+P-K with shape:
For example, say we want to subtract 4 scattered elements from a rank-1 tensor with 8 elements. In Python, that subtraction would look like this:
The resulting update to ref would look like this:
See tf.scatter_nd for more details about how to make updates to slices.


Applies sparse updates to individual values or slices within a given
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ResourceScatterNdUpdate
variable according to indices.
ref is a Tensor with rank P and indices is a Tensor of rank Q.
indices must be integer tensor, containing indices into ref. It must be shape [d_0, ..., d_{Q-2}, K] where 0 < K <= P.
The innermost dimension of indices (with length K) corresponds to indices into elements (if K = P) or slices (if K < P) along the Kth dimension of ref.
updates is Tensor of rank Q-1+P-K with shape:
For example, say we want to update 4 scattered elements to a rank-1 tensor to 8 elements. In Python, that update would look like this:
The resulting update to ref would look like this:
See tf.scatter_nd for more details about how to make updates to slices.


Subtracts sparse updates from the variable referenced by resource.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ResourceScatterSub
This operation computes
Duplicate entries are handled correctly: if multiple indices reference the same location, their contributions add.
Requires updates.shape = indices.shape + ref.shape[1:] or updates.shape = [].


Assigns sparse updates to the variable referenced by resource.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ResourceScatterUpdate
This operation computes


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


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.ResourceSparseApplyAdagrad
That is for rows we have grad for, we update var and accum as follows: accum += grad * grad var -= lr * grad * (1 / sqrt(accum))


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.ResourceSparseApplyAdagradDA


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.ResourceSparseApplyAdagradV2
That is for rows we have grad for, we update var and accum as follows: accum += grad * grad var -= lr * grad * (1 / sqrt(accum))


Update '*var' according to the centered RMSProp algorithm.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ResourceSparseApplyCenteredRMSProp
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)
ms <- rho * ms{t-1} + (1-rho) * grad * grad mom <- momentum * mom{t-1} + lr * grad / sqrt(ms + epsilon) var <- var - mom


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.ResourceSparseApplyFtrl
That is for rows we have grad for, we update var, accum and linear as follows: accum_new = accum + grad * grad linear += grad - (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' according to the Ftrl-proximal scheme.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ResourceSparseApplyFtrlV2
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_with_shrinkage * grad_with_shrinkage 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.ResourceSparseApplyKerasMomentum
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:
accum = accum * momentum - lr * grad var += accum


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.ResourceSparseApplyMomentum
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:
accum = accum * momentum + grad var -= lr * accum


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.ResourceSparseApplyProximalAdagrad
That is for rows we have grad for, we update var and accum as follows: accum += grad * grad prox_v = var prox_v -= lr * grad * (1 / sqrt(accum)) var = sign(prox_v)/(1+lr*l2) * max{|prox_v|-lr*l1,0}


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.ResourceSparseApplyProximalGradientDescent
That is for rows we have grad for, we update var as follows: prox_v = var - alpha * grad var = sign(prox_v)/(1+alpha*l2) * max{|prox_v|-alpha*l1,0}


Update '*var' according to the RMSProp algorithm.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ResourceSparseApplyRMSProp
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)
ms <- rho * ms{t-1} + (1-rho) * grad * grad mom <- momentum * mom{t-1} + lr * grad / sqrt(ms + epsilon) var <- var - mom


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.ResourceStridedSliceAssign
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 inStridedSlice`.
NOTE this op currently does not support broadcasting and so value's shape must be exactly the shape produced by the slice of ref.


Restores a tensor from checkpoint files.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.Restore
Reads a tensor stored in one or several files. If there are several files (for instance because a tensor was saved as slices), file_pattern may contain wildcard symbols (* and ?) in the filename portion only, not in the directory portion.
If a file_pattern matches several files, preferred_shard can be used to hint in which file the requested tensor is likely to be found. This op will first open the file at index preferred_shard in the list of matching files and try to restore tensors from that file. Only if some tensors or tensor slices are not found in that first file, then the Op opens all the files. Setting preferred_shard to match the value passed as the shard input of a matching Save Op may speed up Restore. This attribute only affects performance, not correctness. The default value -1 means files are processed in order.
See also RestoreSlice.


Restores a tensor from checkpoint files.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.RestoreSlice
This is like Restore except that restored tensor can be listed as filling only a slice of a larger tensor. shape_and_slice specifies the shape of the larger tensor and the slice that the restored tensor covers.
The shape_and_slice input has the same format as the elements of the shapes_and_slices input of the SaveSlices op.


Restores tensors from a V2 checkpoint.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.RestoreV2
For backward compatibility with the V1 format, this Op currently allows restoring from a V1 checkpoint as well:
By default, restores the named tensors in full. If the caller wishes to restore specific slices of stored tensors, "shape_and_slices" should be non-empty strings and correspondingly well-formed.
Callers must ensure all the named tensors are indeed stored in the checkpoint.


Retrieve Adadelta embedding parameters.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.RetrieveTPUEmbeddingAdadeltaParameters
An op that retrieves optimization parameters from embedding to host memory. Must be preceded by a ConfigureTPUEmbeddingHost op that sets up the correct embedding table configuration. For example, this op is used to retrieve updated parameters before saving a checkpoint.


Retrieve Adadelta embedding parameters with debug support.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.RetrieveTPUEmbeddingAdadeltaParametersGradAccumDebug
An op that retrieves optimization parameters from embedding to host memory. Must be preceded by a ConfigureTPUEmbeddingHost op that sets up the correct embedding table configuration. For example, this op is used to retrieve updated parameters before saving a checkpoint.


Retrieve Adagrad embedding parameters.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.RetrieveTPUEmbeddingAdagradParameters
An op that retrieves optimization parameters from embedding to host memory. Must be preceded by a ConfigureTPUEmbeddingHost op that sets up the correct embedding table configuration. For example, this op is used to retrieve updated parameters before saving a checkpoint.


Retrieve Adagrad embedding parameters with debug support.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.RetrieveTPUEmbeddingAdagradParametersGradAccumDebug
An op that retrieves optimization parameters from embedding to host memory. Must be preceded by a ConfigureTPUEmbeddingHost op that sets up the correct embedding table configuration. For example, this op is used to retrieve updated parameters before saving a checkpoint.


Retrieve ADAM embedding parameters.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.RetrieveTPUEmbeddingADAMParameters
An op that retrieves optimization parameters from embedding to host memory. Must be preceded by a ConfigureTPUEmbeddingHost op that sets up the correct embedding table configuration. For example, this op is used to retrieve updated parameters before saving a checkpoint.


Retrieve ADAM embedding parameters with debug support.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.RetrieveTPUEmbeddingADAMParametersGradAccumDebug
An op that retrieves optimization parameters from embedding to host memory. Must be preceded by a ConfigureTPUEmbeddingHost op that sets up the correct embedding table configuration. For example, this op is used to retrieve updated parameters before saving a checkpoint.


Retrieve centered RMSProp embedding parameters.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.RetrieveTPUEmbeddingCenteredRMSPropParameters
An op that retrieves optimization parameters from embedding to host memory. Must be preceded by a ConfigureTPUEmbeddingHost op that sets up the correct embedding table configuration. For example, this op is used to retrieve updated parameters before saving a checkpoint.


Retrieve FTRL embedding parameters.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.RetrieveTPUEmbeddingFTRLParameters
An op that retrieves optimization parameters from embedding to host memory. Must be preceded by a ConfigureTPUEmbeddingHost op that sets up the correct embedding table configuration. For example, this op is used to retrieve updated parameters before saving a checkpoint.


Retrieve FTRL embedding parameters with debug support.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.RetrieveTPUEmbeddingFTRLParametersGradAccumDebug
An op that retrieves optimization parameters from embedding to host memory. Must be preceded by a ConfigureTPUEmbeddingHost op that sets up the correct embedding table configuration. For example, this op is used to retrieve updated parameters before saving a checkpoint.


Retrieve MDL Adagrad Light embedding parameters.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.RetrieveTPUEmbeddingMDLAdagradLightParameters
An op that retrieves optimization parameters from embedding to host memory. Must be preceded by a ConfigureTPUEmbeddingHost op that sets up the correct embedding table configuration. For example, this op is used to retrieve updated parameters before saving a checkpoint.


Retrieve Momentum embedding parameters.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.RetrieveTPUEmbeddingMomentumParameters
An op that retrieves optimization parameters from embedding to host memory. Must be preceded by a ConfigureTPUEmbeddingHost op that sets up the correct embedding table configuration. For example, this op is used to retrieve updated parameters before saving a checkpoint.


Retrieve Momentum embedding parameters with debug support.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.RetrieveTPUEmbeddingMomentumParametersGradAccumDebug
An op that retrieves optimization parameters from embedding to host memory. Must be preceded by a ConfigureTPUEmbeddingHost op that sets up the correct embedding table configuration. For example, this op is used to retrieve updated parameters before saving a checkpoint.


Retrieve proximal Adagrad embedding parameters.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.RetrieveTPUEmbeddingProximalAdagradParameters
An op that retrieves optimization parameters from embedding to host memory. Must be preceded by a ConfigureTPUEmbeddingHost op that sets up the correct embedding table configuration. For example, this op is used to retrieve updated parameters before saving a checkpoint.


Retrieve proximal Adagrad embedding parameters with debug support.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.RetrieveTPUEmbeddingProximalAdagradParametersGradAccumDebug
An op that retrieves optimization parameters from embedding to host memory. Must be preceded by a ConfigureTPUEmbeddingHost op that sets up the correct embedding table configuration. For example, this op is used to retrieve updated parameters before saving a checkpoint.


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


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


Retrieve RMSProp embedding parameters.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.RetrieveTPUEmbeddingRMSPropParameters
An op that retrieves optimization parameters from embedding to host memory. Must be preceded by a ConfigureTPUEmbeddingHost op that sets up the correct embedding table configuration. For example, this op is used to retrieve updated parameters before saving a checkpoint.


Retrieve RMSProp embedding parameters with debug support.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.RetrieveTPUEmbeddingRMSPropParametersGradAccumDebug
An op that retrieves optimization parameters from embedding to host memory. Must be preceded by a ConfigureTPUEmbeddingHost op that sets up the correct embedding table configuration. For example, this op is used to retrieve updated parameters before saving a checkpoint.


Retrieve SGD embedding parameters.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.RetrieveTPUEmbeddingStochasticGradientDescentParameters
An op that retrieves optimization parameters from embedding to host memory. Must be preceded by a ConfigureTPUEmbeddingHost op that sets up the correct embedding table configuration. For example, this op is used to retrieve updated parameters before saving a checkpoint.


Retrieve SGD embedding parameters with debug support.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.RetrieveTPUEmbeddingStochasticGradientDescentParametersGradAccumDebug
An op that retrieves optimization parameters from embedding to host memory. Must be preceded by a ConfigureTPUEmbeddingHost op that sets up the correct embedding table configuration. For example, this op is used to retrieve updated parameters before saving a checkpoint.


Reverses specific dimensions of a tensor.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.Reverse
Given a tensor, and a bool tensor dims representing the dimensions of tensor, this operation reverses each dimension i of tensor where dims[i] is True.
tensor can have up to 8 dimensions. The number of dimensions of tensor must equal the number of elements in dims. In other words:
rank(tensor) = size(dims)


Reverses variable length slices.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ReverseSequence
This op first slices input along the dimension batch_dim, and for each slice i, reverses the first seq_lengths[i] elements along the dimension seq_dim.
The elements of seq_lengths must obey seq_lengths[i] <= input.dims[seq_dim], and seq_lengths must be a vector of length input.dims[batch_dim].
The output slice i along dimension batch_dim is then given by input slice i, with the first seq_lengths[i] slices along dimension seq_dim reversed.
In contrast, if:


Reverses specific dimensions of a tensor.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ReverseV2
NOTE tf.reverse has now changed behavior in preparation for 1.0. tf.reverse_v2 is currently an alias that will be deprecated before TF 1.0.
Given a tensor, and a int32 tensor axis representing the set of dimensions of tensor to reverse. This operation reverses each dimension i for which there exists j s.t. axis[j] == i.
tensor can have up to 8 dimensions. The number of dimensions specified in axis may be 0 or more entries. If an index is specified more than once, a InvalidArgument error is raised.


Real-valued fast Fourier transform.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.RFFT
Computes the 1-dimensional discrete Fourier transform of a real-valued signal over the inner-most dimension of input.
Since the DFT of a real signal is Hermitian-symmetric, RFFT only returns the fft_length / 2 + 1 unique components of the FFT: the zero-frequency term, followed by the fft_length / 2 positive-frequency terms.
Along the axis RFFT is computed on, if fft_length is smaller than the corresponding dimension of input, the dimension is cropped. If it is larger, the dimension is padded with zeros.


2D real-valued fast Fourier transform.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.RFFT2D
Computes the 2-dimensional discrete Fourier transform of a real-valued signal over the inner-most 2 dimensions of input.
Since the DFT of a real signal is Hermitian-symmetric, RFFT2D only returns the fft_length / 2 + 1 unique components of the FFT for the inner-most dimension of output: the zero-frequency term, followed by the fft_length / 2 positive-frequency terms.
Along each axis RFFT2D is computed on, if fft_length is smaller than the corresponding dimension of input, the dimension is cropped. If it is larger, the dimension is padded with zeros.


3D real-valued fast Fourier transform.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.RFFT3D
Computes the 3-dimensional discrete Fourier transform of a real-valued signal over the inner-most 3 dimensions of input.
Since the DFT of a real signal is Hermitian-symmetric, RFFT3D only returns the fft_length / 2 + 1 unique components of the FFT for the inner-most dimension of output: the zero-frequency term, followed by the fft_length / 2 positive-frequency terms.
Along each axis RFFT3D is computed on, if fft_length is smaller than the corresponding dimension of input, the dimension is cropped. If it is larger, the dimension is padded with zeros.


Converts one or more images from RGB to HSV.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.RGBToHSV
Outputs a tensor of the same shape as the images tensor, containing the HSV value of the pixels. The output is only well defined if the value in images are in [0,1].
output[..., 0] contains hue, output[..., 1] contains saturation, and output[..., 2] contains value. All HSV values are in [0,1]. A hue of 0 corresponds to pure red, hue 1/3 is pure green, and 2/3 is pure blue.


Elementwise computes the bitwise right-shift of x and y.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.RightShift
Performs a logical shift for unsigned integer types, and an arithmetic shift for signed integer types.
If y is negative, or greater than or equal to than the width of x in bits the result is implementation defined.


Returns element-wise integer closest to x.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.Rint
If the result is midway between two representable values, the even representable is chosen. For example:


Advance the counter of a counter-based RNG.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.RngReadAndSkip
The state of the RNG after rng_read_and_skip(n) will be the same as that after uniform([n]) (or any other distribution). The actual increment added to the counter is an unspecified implementation choice.


Advance the counter of a counter-based RNG.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.RngSkip
The state of the RNG after rng_skip(n) will be the same as that after stateful_uniform([n]) (or any other distribution). The actual increment added to the counter is an unspecified implementation detail.


Rolls the elements of a tensor along an axis.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.Roll
The elements are shifted positively (towards larger indices) by the offset of shift along the dimension of axis. Negative shift values will shift elements in the opposite direction. Elements that roll passed the last position will wrap around to the first and vice versa. Multiple shifts along multiple axes may be specified.


Rounds the values of a tensor to the nearest integer, element-wise.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.Round
Rounds half to even. Also known as bankers rounding. If you want to round according to the current system rounding mode use std::cint.


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


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


Generate a single randomly distorted bounding box for an image.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SampleDistortedBoundingBox
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 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 height of the underlying image.
For example,
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.


Generate a single randomly distorted bounding box for an image.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SampleDistortedBoundingBoxV2
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 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 height of the underlying image.
For example,
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.


Creates a dataset that takes a Bernoulli sample of the contents of another dataset.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SamplingDataset
There is no transformation in the tf.data Python API for creating this dataset. Instead, it is created as a result of the filter_with_random_uniform_fusion static optimization. Whether this optimization is performed is determined by the experimental_optimization.filter_with_random_uniform_fusion option of tf.data.Options.


Saves the input tensors to disk.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.Save
The size of tensor_names must match the number of tensors in data. data[i] is written to filename with name tensor_names[i].
See also SaveSlices.


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


Saves input tensors slices to disk.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SaveSlices
This is like Save except that tensors can be listed in the saved file as being a slice of a larger tensor. shapes_and_slices specifies the shape of the larger tensor and the slice that this tensor covers. shapes_and_slices must have as many elements as tensor_names.
Elements of the shapes_and_slices input must either be:
slice-spec itself is a :-separated list: slice0:slice1:...:sliceN-1 where each sliceI is either:
See also Save.


Saves tensors in V2 checkpoint format.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SaveV2
By default, saves the named tensors in full. If the caller wishes to save specific slices of full tensors, "shape_and_slices" should be non-empty strings and correspondingly well-formed.


Outputs a Summary protocol buffer with scalar values.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ScalarSummary
The input tags and values must have the same shape. The generated summary has a summary value for each tag-value pair in tags and values.


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


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


Creates a dataset successively reduces f over the elements of input_dataset.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ScanDataset


Adds sparse updates to a variable reference.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ScatterAdd
This operation computes
This operation outputs ref after the update is done. This makes it easier to chain operations that need to use the reset value.
Duplicate entries are handled correctly: if multiple indices reference the same location, their contributions add.
Requires updates.shape = indices.shape + ref.shape[1:] or updates.shape = [].


Divides a variable reference by sparse updates.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ScatterDiv
This operation computes
This operation outputs ref after the update is done. This makes it easier to chain operations that need to use the reset value.
Duplicate entries are handled correctly: if multiple indices reference the same location, their contributions divide.
Requires updates.shape = indices.shape + ref.shape[1:] or updates.shape = [].


Reduces sparse updates into a variable reference using the max operation.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ScatterMax
This operation computes
This operation outputs ref after the update is done. This makes it easier to chain operations that need to use the reset value.
Duplicate entries are handled correctly: if multiple indices reference the same location, their contributions combine.
Requires updates.shape = indices.shape + ref.shape[1:] or updates.shape = [].


Reduces sparse updates into a variable reference using the min operation.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ScatterMin
This operation computes
This operation outputs ref after the update is done. This makes it easier to chain operations that need to use the reset value.
Duplicate entries are handled correctly: if multiple indices reference the same location, their contributions combine.
Requires updates.shape = indices.shape + ref.shape[1:] or updates.shape = [].


Multiplies sparse updates into a variable reference.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ScatterMul
This operation computes
This operation outputs ref after the update is done. This makes it easier to chain operations that need to use the reset value.
Duplicate entries are handled correctly: if multiple indices reference the same location, their contributions multiply.
Requires updates.shape = indices.shape + ref.shape[1:] or updates.shape = [].


Scatter updates into a new tensor according to indices.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ScatterNd
Creates a new tensor by applying sparse updates to individual values or slices within a tensor (initially zero for numeric, empty for string) of the given shape according to indices. This operator is the inverse of the tf.gather_nd operator which extracts values or slices from a given tensor.
This operation is similar to tensor_scatter_add, except that the tensor is zero-initialized. Calling tf.scatter_nd(indices, values, shape) is identical to tensor_scatter_add(tf.zeros(shape, values.dtype), indices, values)
If indices contains duplicates, then their updates are accumulated (summed).
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 scatter is to insert individual elements in 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 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 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.


Applies sparse addition to individual values or slices in a Variable.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ScatterNdAdd
ref is a Tensor with rank P and indices is a Tensor of rank Q.
indices must be integer tensor, containing indices into ref. It must be shape [d_0, ..., d_{Q-2}, K] where 0 < K <= P.
The innermost dimension of indices (with length K) corresponds to indices into elements (if K = P) or slices (if K < P) along the Kth dimension of ref.
updates is Tensor of rank Q-1+P-K with shape:
For example, say we want to add 4 scattered elements to a rank-1 tensor to 8 elements. In Python, that addition would look like this:
The resulting update to ref would look like this:
See tf.scatter_nd for more details about how to make updates to slices.


Computes element-wise maximum.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ScatterNdMax


Computes element-wise minimum.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ScatterNdMin


Applies sparse addition to input using individual values or slices
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ScatterNdNonAliasingAdd
from updates according to indices indices. The updates are non-aliasing: input is only modified in-place if no other operations will use it. Otherwise, a copy of input is made. This operation has a gradient with respect to both input and updates.
input is a Tensor with rank P and indices is a Tensor of rank Q.
indices must be integer tensor, containing indices into input. It must be shape \([d_0, ..., d_{Q-2}, K]\) where 0 < K <= P.
The innermost dimension of indices (with length K) corresponds to indices into elements (if K = P) or (P-K)-dimensional slices (if K < P) along the Kth dimension of input.
updates is Tensor of rank Q-1+P-K with shape:
For example, say we want to add 4 scattered elements to a rank-1 tensor to 8 elements. In Python, that addition would look like this:
The resulting value output would look like this:
See tf.scatter_nd for more details about how to make updates to slices.


Applies sparse subtraction to individual values or slices in a Variable.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ScatterNdSub
within a given variable according to indices.
ref is a Tensor with rank P and indices is a Tensor of rank Q.
indices must be integer tensor, containing indices into ref. It must be shape [d_0, ..., d_{Q-2}, K] where 0 < K <= P.
The innermost dimension of indices (with length K) corresponds to indices into elements (if K = P) or slices (if K < P) along the Kth dimension of ref.
updates is Tensor of rank Q-1+P-K with shape:
For example, say we want to subtract 4 scattered elements from a rank-1 tensor with 8 elements. In Python, that subtraction would look like this:
The resulting update to ref would look like this:
See tf.scatter_nd for more details about how to make updates to slices.


Applies sparse updates to individual values or slices within a given
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ScatterNdUpdate
variable according to indices.
ref is a Tensor with rank P and indices is a Tensor of rank Q.
indices must be integer tensor, containing indices into ref. It must be shape \([d_0, ..., d_{Q-2}, K]\) where 0 < K <= P.
The innermost dimension of indices (with length K) corresponds to indices into elements (if K = P) or slices (if K < P) along the Kth dimension of ref.
updates is Tensor of rank Q-1+P-K with shape:
For example, say we want to update 4 scattered elements to a rank-1 tensor to 8 elements. In Python, that update would look like this:
The resulting update to ref would look like this:
See tf.scatter_nd for more details about how to make updates to slices.
See also tf.scatter_update and tf.batch_scatter_update.


Subtracts sparse updates to a variable reference.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ScatterSub
This operation outputs ref after the update is done. This makes it easier to chain operations that need to use the reset value.
Duplicate entries are handled correctly: if multiple indices reference the same location, their (negated) contributions add.
Requires updates.shape = indices.shape + ref.shape[1:] or updates.shape = [].


Applies sparse updates to a variable reference.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ScatterUpdate
This operation computes
This operation outputs ref after the update is done. This makes it easier to chain operations that need to use the reset value.
If values in ref is to be updated more than once, because there are duplicate entries in indices, the order at which the updates happen for each value is undefined.
Requires updates.shape = indices.shape + ref.shape[1:] or updates.shape = [].
See also tf.batch_scatter_update and tf.scatter_nd_update.


Computes fingerprints of the input strings.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SdcaFprint


Distributed version of Stochastic Dual Coordinate Ascent (SDCA) optimizer for
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SdcaOptimizer
linear models with L1 + L2 regularization. As global optimization objective is strongly-convex, the optimizer optimizes the dual objective at each step. The optimizer applies each update one example at a time. Examples are sampled uniformly, and the optimizer is learning rate free and enjoys linear convergence rate.
Proximal Stochastic Dual Coordinate Ascent. Shai Shalev-Shwartz, Tong Zhang. 2012
Adding vs. Averaging in Distributed Primal-Dual Optimization. Chenxin Ma, Virginia Smith, Martin Jaggi, Michael I. Jordan, Peter Richtarik, Martin Takac. 2015
Stochastic Dual Coordinate Ascent with Adaptive Probabilities. Dominik Csiba, Zheng Qu, Peter Richtarik. 2015


Distributed version of Stochastic Dual Coordinate Ascent (SDCA) optimizer for
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SdcaOptimizerV2
linear models with L1 + L2 regularization. As global optimization objective is strongly-convex, the optimizer optimizes the dual objective at each step. The optimizer applies each update one example at a time. Examples are sampled uniformly, and the optimizer is learning rate free and enjoys linear convergence rate.
Proximal Stochastic Dual Coordinate Ascent. Shai Shalev-Shwartz, Tong Zhang. 2012
Adding vs. Averaging in Distributed Primal-Dual Optimization. Chenxin Ma, Virginia Smith, Martin Jaggi, Michael I. Jordan, Peter Richtarik, Martin Takac. 2015
Stochastic Dual Coordinate Ascent with Adaptive Probabilities. Dominik Csiba, Zheng Qu, Peter Richtarik. 2015


Applies L1 regularization shrink step on the parameters.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SdcaShrinkL1


Computes the maximum along segments of a tensor.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SegmentMax
Read the section on segmentation for an explanation of segments.
Computes a tensor such that \(output_i = \max_j(data_j)\) where max is over j such that segment_ids[j] == i.
If the max is empty for a given segment ID i, output[i] = 0.


Computes the mean along segments of a tensor.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SegmentMean
Read the section on segmentation for an explanation of segments.
Computes a tensor such that \(output_i = \frac{\sum_j data_j}{N}\) where mean is over j such that segment_ids[j] == i and N is the total number of values summed.
If the mean is empty for a given segment ID i, output[i] = 0.


Computes the minimum along segments of a tensor.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SegmentMin
Read the section on segmentation for an explanation of segments.
Computes a tensor such that \(output_i = \min_j(data_j)\) where min is over j such that segment_ids[j] == i.
If the min is empty for a given segment ID i, output[i] = 0.


Computes the product along segments of a tensor.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SegmentProd
Read the section on segmentation for an explanation of segments.
Computes a tensor such that \(output_i = \prod_j data_j\) where the product is over j such that segment_ids[j] == i.
If the product is empty for a given segment ID i, output[i] = 1.


Computes the sum along segments of a tensor.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SegmentSum
Read the section on segmentation for an explanation of segments.
Computes a tensor such that \(output_i = \sum_j data_j\) where sum is over j such that segment_ids[j] == i.
If the sum is empty for a given segment ID i, output[i] = 0.


Selects elements from x or y, depending on condition.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.Select
The x, and y tensors must all have the same shape, and the output will also have that shape.
The condition tensor must be a scalar if x and y are scalars. If x and y are vectors or higher rank, then condition must be either a scalar, a vector with size matching the first dimension of x, or must have the same shape as x.
The condition tensor acts as a mask that chooses, based on the value at each element, whether the corresponding element / row in the output should be taken from x (if true) or y (if false).
If condition is a vector and x and y are higher rank matrices, then it chooses which row (outer dimension) to copy from x and y. If condition has the same shape as x and y, then it chooses which element to copy from x and y.


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


Computes the Eigen Decomposition of a batch of square self-adjoint matrices.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SelfAdjointEig
The input is a tensor of shape [..., M, M] whose inner-most 2 dimensions form square matrices, with the same constraints as the single matrix SelfAdjointEig.
The result is a [..., M+1, M] matrix with [..., 0,:] containing the eigenvalues, and subsequent [...,1:, :] containing the eigenvectors. The eigenvalues are sorted in non-decreasing order.


Computes the eigen decomposition of one or more square self-adjoint matrices.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SelfAdjointEigV2
Computes the eigenvalues and (optionally) eigenvectors of each inner matrix in input such that input[..., :, :] = v[..., :, :] * diag(e[..., :]). The eigenvalues are sorted in non-decreasing order.


Computes scaled exponential linear: scale * alpha * (exp(features) - 1)
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.Selu
if < 0, scale * features otherwise.
To be used together with initializer = tf.variance_scaling_initializer(factor=1.0, mode='FAN_IN'). For correct dropout, use tf.contrib.nn.alpha_dropout.
See Self-Normalizing Neural Networks


Computes gradients for the scaled exponential linear (Selu) operation.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SeluGrad


Sends the named tensor from send_device to recv_device.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.Send


Performs gradient updates of embedding tables.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SendTPUEmbeddingGradients


Converts the given resource_handle representing an iterator to a variant tensor.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SerializeIterator


Serialize an N-minibatch SparseTensor into an [N, 3] Tensor object.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SerializeManySparse
The SparseTensor must have rank R greater than 1, and the first dimension is treated as the minibatch dimension. Elements of the SparseTensor must be sorted in increasing order of this first dimension. The serialized SparseTensor objects going into each row of serialized_sparse will have rank R-1.
The minibatch size N is extracted from sparse_shape[0].


Serialize a SparseTensor into a [3] Tensor object.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SerializeSparse


Transforms a Tensor into a serialized TensorProto proto.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SerializeTensor


Number of unique elements along last dimension of input set.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.SetSize
Input set is a SparseTensor represented by set_indices, set_values, and set_shape. The last dimension contains values in a set, duplicates are allowed but ignored.
If validate_indices is True, this op validates the order and range of set indices.


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