The op extracts fields from a serialized protocol buffers message into tensors.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.DecodeProtoV2
The decode_proto op extracts fields from a serialized protocol buffers message into tensors. The fields in field_names are decoded and converted to the corresponding output_types if possible.
A message_type name must be provided to give context for the field names. The actual message descriptor can be looked up either in the linked-in descriptor pool or a filename provided by the caller using the descriptor_source attribute.
Each output tensor is a dense tensor. This means that it is padded to hold the largest number of repeated elements seen in the input minibatch. (The shape is also padded by one to prevent zero-sized dimensions). The actual repeat counts for each example in the minibatch can be found in the sizes output. In many cases the output of decode_proto is fed immediately into tf.squeeze if missing values are not a concern. When using tf.squeeze, always pass the squeeze dimension explicitly to avoid surprises.
For the most part, the mapping between Proto field types and TensorFlow dtypes is straightforward. However, there are a few special cases:
A proto field that contains a submessage or group can only be converted to DT_STRING (the serialized submessage). This is to reduce the complexity of the API. The resulting string can be used as input to another instance of the decode_proto op.
TensorFlow lacks support for unsigned integers. The ops represent uint64 types as a DT_INT64 with the same twos-complement bit pattern (the obvious way). Unsigned int32 values can be represented exactly by specifying type DT_INT64, or using twos-complement if the caller specifies DT_INT32 in the output_types attribute.
Both binary and text proto serializations are supported, and can be chosen using the format attribute.
The descriptor_source attribute selects the source of protocol descriptors to consult when looking up message_type. This may be:
An empty string or "local://", in which case protocol descriptors are created for C++ (not Python) proto definitions linked to the binary.
A file, in which case protocol descriptors are created from the file, which is expected to contain a FileDescriptorSet serialized as a string. NOTE: You can build a descriptor_source file using the --descriptor_set_out and --include_imports options to the protocol compiler protoc.
A "bytes://", in which protocol descriptors are created from <bytes>, which is expected to be a FileDescriptorSet serialized as a string.


Reinterpret the bytes of a string as a vector of numbers.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.DecodeRaw


Decode a 16-bit PCM WAV file to a float tensor.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.DecodeWav
The -32768 to 32767 signed 16-bit values will be scaled to -1.0 to 1.0 in float.
When desired_channels is set, if the input contains fewer channels than this then the last channel will be duplicated to give the requested number, else if the input has more channels than requested then the additional channels will be ignored.
If desired_samples is set, then the audio will be cropped or padded with zeroes to the requested length.
The first output contains a Tensor with the content of the audio samples. The lowest dimension will be the number of channels, and the second will be the number of samples. For example, a ten-sample-long stereo WAV file should give an output shape of [10, 2].


Makes a copy of x.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.DeepCopy


A container for an iterator resource.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.DeleteIterator


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


A container for an iterator resource.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.DeleteMultiDeviceIterator


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


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


Delete the tensor specified by its handle in the session.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.DeleteSessionTensor


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.DenseBincount
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 tf.tensor input.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.DenseCountSparseOutput
Counts the number of times each value occurs in the input.


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


Applies set operation along last dimension of 2 Tensor inputs.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.DenseToDenseSetOperation
See SetOperationOp::SetOperationFromContext for values of set_operation.
Output result is a SparseTensor represented by result_indices, result_values, and result_shape. For set1 and set2 ranked n, this has rank n and the same 1st n-1 dimensions as set1 and set2. The nth dimension contains the result of set_operation applied to the corresponding [0...n-1] dimension of set.


Creates a dataset that batches input elements into a SparseTensor.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.DenseToSparseBatchDataset


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


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


Computes a 2-D depthwise convolution given 4-D input and filter tensors.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.DepthwiseConv2dNative
Given an input tensor of shape [batch, in_height, in_width, in_channels] and a filter / kernel tensor of shape [filter_height, filter_width, in_channels, channel_multiplier], containing in_channels convolutional filters of depth 1, depthwise_conv2d applies a different filter to each input channel (expanding from 1 channel to channel_multiplier channels for each), then concatenates the results together. Thus, the output has in_channels * channel_multiplier channels.
Must have strides[0] = strides[3] = 1. For the most common case of the same horizontal and vertices strides, strides = [1, stride, stride, 1].


Computes the gradients of depthwise convolution with respect to the filter.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.DepthwiseConv2dNativeBackpropFilter


Computes the gradients of depthwise convolution with respect to the input.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.DepthwiseConv2dNativeBackpropInput


Dequantize the 'input' tensor into a float or bfloat16 Tensor.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.Dequantize
[min_range, max_range] are scalar floats that specify the range for the output. The 'mode' attribute controls exactly which calculations are used to convert the 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
If the input comes from a QuantizedRelu6, the output type is quint8 (range of 0-255) but the possible range of QuantizedRelu6 is 0-6. The min_range and max_range values are therefore 0.0 and 6.0. Dequantize on quint8 will take each value, cast to float, and multiply by 6 / 255. Note that if quantizedtype is qint8, the operation will additionally add each value by 128 prior to casting.
If the mode is 'MIN_FIRST', then this approach is used:
If the mode is SCALED, dequantization is performed by multiplying each input value by a scaling_factor. (Thus an input of 0 always maps to 0.0).
The scaling_factor is determined from min_range, max_range, and narrow_range in a way that is compatible with QuantizeAndDequantize{V2|V3} and QuantizeV2, using the following algorithm:


Converts the given variant tensor to an iterator and stores it in the given resource.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.DeserializeIterator


Deserialize and concatenate SparseTensors from a serialized minibatch.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.DeserializeManySparse
The input serialized_sparse must be a string matrix of shape [N x 3] where N is the minibatch size and the rows correspond to packed outputs of SerializeSparse. The ranks of the original SparseTensor objects must all match. When the final SparseTensor is created, it has rank one higher than the ranks of the incoming SparseTensor objects (they have been concatenated along a new row dimension).
The output SparseTensor object's shape values for all dimensions but the first are the max across the input SparseTensor objects' shape values for the corresponding dimensions. Its first shape value is N, the minibatch size.
The input SparseTensor objects' indices are assumed ordered in standard lexicographic order. If this is not the case, after this step run SparseReorder to restore index ordering.
For example, if the serialized input is a [2 x 3] matrix representing two original SparseTensor objects:
and
then the final deserialized SparseTensor will be:


Deserialize SparseTensor objects.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.DeserializeSparse
The input serialized_sparse must have the shape [?, ?, ..., ?, 3] where the last dimension stores serialized SparseTensor objects and the other N dimensions (N >= 0) correspond to a batch. The ranks of the original SparseTensor objects must all match. When the final SparseTensor is created, its rank is the rank of the incoming SparseTensor objects plus N; the sparse tensors have been concatenated along new dimensions, one for each batch.
The output SparseTensor object's shape values for the original dimensions are the max across the input SparseTensor objects' shape values for the corresponding dimensions. The new dimensions match the size of the batch.
The input SparseTensor objects' indices are assumed ordered in standard lexicographic order. If this is not the case, after this step run SparseReorder to restore index ordering.
For example, if the serialized input is a [2 x 3] matrix representing two original SparseTensor objects:
and
then the final deserialized SparseTensor will be:


Deletes the resource specified by the handle.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.DestroyResourceOp
All subsequent operations using the resource will result in a NotFound error status.


Destroys the temporary variable and returns its final value.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.DestroyTemporaryVariable
Sets output to the value of the Tensor pointed to by 'ref', then destroys the temporary variable called 'var_name'. All other uses of 'ref' must have executed before this op. This is typically achieved by chaining the ref through each assign op, or by using control dependencies.
Outputs the final value of the tensor pointed to by 'ref'.


Return the index of device the op runs.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.DeviceIndex
Given a list of device names, this operation returns the index of the device this op runs. The length of the list is returned in two cases: (1) Device does not exist in the given device list. (2) It is in XLA compilation.


Returns a diagonal tensor with a given diagonal values.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.Diag
Given a diagonal, this operation returns a tensor with the diagonal and everything else padded with zeros. The diagonal is computed as follows:
Assume diagonal has dimensions [D1,..., Dk], then the output is a tensor of rank 2k with dimensions [D1,..., Dk, D1,..., Dk] where:
output[i1,..., ik, i1,..., ik] = diagonal[i1, ..., ik] and 0 everywhere else.


Returns the diagonal part of the tensor.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.DiagPart
This operation returns a tensor with the diagonal part of the input. The diagonal part is computed as follows:
Assume input has dimensions [D1,..., Dk, D1,..., Dk], then the output is a tensor of rank k with dimensions [D1,..., Dk] where:
diagonal[i1,..., ik] = input[i1, ..., ik, i1,..., ik].


Computes Psi, the derivative of Lgamma (the log of the absolute value of
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.Digamma
Gamma(x)), element-wise.


Computes the grayscale dilation of 4-D input and 3-D filter tensors.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.Dilation2D
The input tensor has shape [batch, in_height, in_width, depth] and the filter tensor has shape [filter_height, filter_width, depth], i.e., each input channel is processed independently of the others with its own structuring function. The output tensor has shape [batch, out_height, out_width, depth]. The spatial dimensions of the output tensor depend on the padding algorithm. We currently only support the default "NHWC" data_format.
In detail, the grayscale morphological 2-D dilation is the max-sum correlation (for consistency with conv2d, we use unmirrored filters):
Max-pooling is a special case when the filter has size equal to the pooling kernel size and contains all zeros.
Note on duality: The dilation of input by the filter is equal to the negation of the erosion of -input by the reflected filter.


Computes the gradient of morphological 2-D dilation with respect to the filter.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.Dilation2DBackpropFilter


Computes the gradient of morphological 2-D dilation with respect to the input.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.Dilation2DBackpropInput


A substitute for InterleaveDataset on a fixed list of N datasets.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.DirectedInterleaveDataset


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


Returns 0 if the denominator is zero.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.DivNoNan


Draw bounding boxes on a batch of images.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.DrawBoundingBoxes
Outputs a copy of images but draws on top of the pixels zero or more bounding boxes specified by the locations in boxes. The coordinates of the each bounding box in boxes are encoded 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, if an image is 100 x 200 pixels (height x width) and the bounding box is [0.1, 0.2, 0.5, 0.9], the upper-left and bottom-right coordinates of the bounding box will be (40, 10) to (180, 50) (in (x,y) coordinates).
Parts of the bounding box may fall outside the image.


Draw bounding boxes on a batch of images.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.DrawBoundingBoxesV2
Outputs a copy of images but draws on top of the pixels zero or more bounding boxes specified by the locations in boxes. The coordinates of the each bounding box in boxes are encoded 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, if an image is 100 x 200 pixels (height x width) and the bounding box is [0.1, 0.2, 0.5, 0.9], the upper-left and bottom-right coordinates of the bounding box will be (40, 10) to (100, 50) (in (x,y) coordinates).
Parts of the bounding box may fall outside the image.


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


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


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


Partitions data into num_partitions tensors using indices from partitions.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.DynamicPartition
For each index tuple js of size partitions.ndim, the slice data[js, ...] becomes part of outputs[partitions[js]]. The slices with partitions[js] = i are placed in outputs[i] in lexicographic order of js, and the first dimension of outputs[i] is the number of entries in partitions equal to i. In detail,
data.shape must start with partitions.shape.
See dynamic_stitch for an example on how to merge partitions back.


Interleave the values from the data tensors into a single tensor.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.DynamicStitch
Builds a merged tensor such that
For example, if each indices[m] is scalar or vector, we have
Each data[i].shape must start with the corresponding indices[i].shape, and the rest of data[i].shape must be constant w.r.t. i. That is, we must have data[i].shape = indices[i].shape + constant. In terms of this constant, the output shape is
Values are merged in order, so if an index appears in both indices[m][i] and indices[n][j] for (m,i) < (n,j) the slice data[n][j] will appear in the merged result. If you do not need this guarantee, ParallelDynamicStitch might perform better on some devices.
This method can be used to merge partitions created by dynamic_partition as illustrated on the following example:


Eagerly executes a python function to compute func(input)->output. The
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.EagerPyFunc
semantics of the input, output, and attributes are the same as those for PyFunc.


Computes the (possibly normalized) Levenshtein Edit Distance.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.EditDistance
The inputs are variable-length sequences provided by SparseTensors (hypothesis_indices, hypothesis_values, hypothesis_shape) and (truth_indices, truth_values, truth_shape).
The output is:


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


Tensor contraction according to Einstein summation convention.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.Einsum
Implements generalized Tensor contraction and reduction. Each input Tensor must have a corresponding input subscript appearing in the comma-separated left-hand side of the equation. The right-hand side of the equation consists of the output subscript. The input subscripts and the output subscript should consist of zero or more named axis labels and at most one ellipsis (...).
The named axis labels may be any single character other than those having special meaning, namely ,.->. The behavior of this Op is undefined if it receives an ill-formatted equation; since the validation is done at graph-building time, we omit format validation checks at runtime.
Operations are applied to the input(s) according to the following rules:
(a) Generalized Diagonals: For input dimensions corresponding to axis labels appearing more than once in the same input subscript, we take the generalized (k-dimensional) diagonal. For example, in the equation iii->i with input shape [3, 3, 3], the generalized diagonal would consist of 3 elements at indices (0, 0, 0), (1, 1, 1) and (2, 2, 2) to create a Tensor of shape [3].
(b) Reduction: Axes corresponding to labels appearing only in one input subscript but not in the output subscript are summed over prior to Tensor contraction. For example, in the equation ab,bc->b, the axis labels a and c are the reduction axis labels.
(c) Batch Dimensions: Axes corresponding to labels appearing in each of the input subscripts and also in the output subscript make up the batch dimensions in Tensor contraction. Unnamed axis labels corresponding to ellipsis (...) also correspond to batch dimensions. For example, for the equation denoting batch matrix multiplication, bij,bjk->bik, the axis label b corresponds to a batch dimension.
(d) Contraction: In case of binary einsum, axes corresponding to labels appearing in two different inputs (and not in the output) are contracted against each other. Considering the batch matrix multiplication equation again (bij,bjk->bik), the contracted axis label is j.
(e) Expand Diagonal: If the output subscripts contain repeated (explicit) axis labels, the opposite operation of (a) is applied. For example, in the equation i->iii, and input shape [3], the output of shape [3, 3, 3] are all zeros, except for the (generalized) diagonal which is populated with values from the input. Note: This operation is not supported by np.einsum or tf.einsum; it is provided to enable computing the symbolic gradient of tf.einsum.
The output subscripts must contain only labels appearing in at least one of the input subscripts. Furthermore, all dimensions mapping to the same axis label must be equal.
Any of the input and output subscripts may contain at most a single ellipsis (...). These ellipsis are mapped against dimensions not corresponding to any named axis label. If two inputs contain ellipsis, then they are broadcasted according to standard NumPy broadcasting rules.
The broadcasted dimensions are placed in the corresponding location of the ellipsis in the output subscript. If the broadcasted dimensions are non-empty and the output subscripts do not contain ellipsis, then an InvalidArgument error is raised.
Similar to numpy.einsum.
Comparison with numpy.einsum:


Computes exponential linear: exp(features) - 1 if < 0, features otherwise.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.Elu
See Fast and Accurate Deep Network Learning by Exponential Linear Units (ELUs)


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


Creates a tensor with the given shape.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.Empty
This operation creates a tensor of shape and dtype.
Args: shape: A Tensor of type int32. 1-D. Represents the shape of the output tensor. dtype: A tf.DType. init: An optional bool. Defaults to False. If True, initialize the returned tensor with the default value of dtype. Otherwise, the implementation is free not to initializethe tensor's content. name: A name for the operation (optional).
Returns: A Tensor of type dtype.


Creates and returns an empty tensor list.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.EmptyTensorList
All list elements must be tensors of dtype element_dtype and shape compatible with element_shape.
handle: an empty tensor list. element_dtype: the type of elements in the list. element_shape: a shape compatible with that of elements in the list.


Encode strings into web-safe base64 format.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.EncodeBase64
Refer to the following article for more information on base64 format: en.wikipedia.org/wiki/Base64. Base64 strings may have padding with '=' at the end so that the encoded has length multiple of 4. See Padding section of the link above.
Web-safe means that the encoder uses - and _ instead of + and /.


JPEG-encode an image.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.EncodeJpeg
image is a 3-D uint8 Tensor of shape [height, width, channels].
The attr format can be used to override the color format of the encoded output. Values can be:
If format is not specified or is the empty string, a default format is picked in function of the number of channels in image:


JPEG encode input image with provided compression quality.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.EncodeJpegVariableQuality
image is a 3-D uint8 Tensor of shape [height, width, channels]. quality is an int32 jpeg compression quality value between 0 and 100.


PNG-encode an image.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.EncodePng
image is a 3-D uint8 or uint16 Tensor of shape [height, width, channels] where channels is:
The ZLIB compression level, compression, can be -1 for the PNG-encoder default or a value from 0 to 9. 9 is the highest compression level, generating the smallest output, but is slower.


The op serializes protobuf messages provided in the input tensors.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.EncodeProto
The types of the tensors in values must match the schema for the fields specified in field_names. All the tensors in values must have a common shape prefix, batch_shape.
The sizes tensor specifies repeat counts for each field. The repeat count (last dimension) of a each tensor in values must be greater than or equal to corresponding repeat count in sizes.
A message_type name must be provided to give context for the field names. The actual message descriptor can be looked up either in the linked-in descriptor pool or a filename provided by the caller using the descriptor_source attribute.
For the most part, the mapping between Proto field types and TensorFlow dtypes is straightforward. However, there are a few special cases:
A proto field that contains a submessage or group can only be converted to DT_STRING (the serialized submessage). This is to reduce the complexity of the API. The resulting string can be used as input to another instance of the decode_proto op.
TensorFlow lacks support for unsigned integers. The ops represent uint64 types as a DT_INT64 with the same twos-complement bit pattern (the obvious way). Unsigned int32 values can be represented exactly by specifying type DT_INT64, or using twos-complement if the caller specifies DT_INT32 in the output_types attribute.
The descriptor_source attribute selects the source of protocol descriptors to consult when looking up message_type. This may be:
An empty string or "local://", in which case protocol descriptors are created for C++ (not Python) proto definitions linked to the binary.
A file, in which case protocol descriptors are created from the file, which is expected to contain a FileDescriptorSet serialized as a string. NOTE: You can build a descriptor_source file using the --descriptor_set_out and --include_imports options to the protocol compiler protoc.
A "bytes://", in which protocol descriptors are created from <bytes>, which is expected to be a FileDescriptorSet serialized as a string.


Encode audio data using the WAV file format.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.EncodeWav
This operation will generate a string suitable to be saved out to create a .wav audio file. It will be encoded in the 16-bit PCM format. It takes in float values in the range -1.0f to 1.0f, and any outside that value will be clamped to that range.
audio is a 2-D float Tensor of shape [length, channels]. sample_rate is a scalar Tensor holding the rate to use (e.g. 44100).


An op that enqueues a list of input batch tensors to TPUEmbedding.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.EnqueueTPUEmbeddingIntegerBatch


Eases the porting of code that uses tf.nn.embedding_lookup().
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.EnqueueTPUEmbeddingRaggedTensorBatch
sample_splits[i], embedding_indices[i] and aggregation_weights[i] correspond to the ith feature. table_ids[i] indicates which embedding table to look up ith feature.
The tensors at corresponding positions in two of the input lists, embedding_indices and aggregation_weights, must have the same shape, i.e. rank 1 with dim_size() equal to the total number of lookups into the table described by the corresponding feature.


An op that enqueues TPUEmbedding input indices from a SparseTensor.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.EnqueueTPUEmbeddingSparseBatch
This Op eases the porting of code that uses embedding_lookup_sparse(), although some Python preprocessing of the SparseTensor arguments to embedding_lookup_sparse() is required to produce the arguments to this Op, since only a single EnqueueTPUEmbeddingSparseBatch Op is allowed per training step.
The tensors at corresponding positions in the three input lists must have the same shape, i.e. rank 1 with dim_size() equal to the total number of lookups into the table described by the corresponding table_id.


Eases the porting of code that uses tf.nn.embedding_lookup_sparse().
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.EnqueueTPUEmbeddingSparseTensorBatch
sample_indices[i], embedding_indices[i] and aggregation_weights[i] correspond to the ith feature. table_ids[i] indicates which embedding table to look up ith feature.
The tensors at corresponding positions in the three input lists (sample_indices, embedding_indices and aggregation_weights) must have the same shape, i.e. rank 1 with dim_size() equal to the total number of lookups into the table described by the corresponding feature.


Ensures that the tensor's shape matches the expected shape.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.EnsureShape
Raises an error if the input tensor's shape does not match the specified shape. Returns the input tensor otherwise.


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.Enter
This op is used together with Exit to create loops in the graph. 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.


Returns the truth value of (x == y) element-wise.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.Equal


Computes the Gauss error function of x element-wise.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.Erf


Computes the complementary error function of x element-wise.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.Erfc


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


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


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


Computes exponential of x element-wise. \(y = e^x\).
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.Exp
This function computes the exponential of every element in the input tensor. i.e. exp(x) or e^(x), where x is the input tensor. e denotes Euler's number and is approximately equal to 2.718281. Output is positive for any real input.
For complex numbers, the exponential value is calculated as follows:
Let's consider complex number 1+1j as an example. e^1 * (cos 1 + i sin 1) = 2.7182818284590 * (0.54030230586+0.8414709848j)


Inserts a dimension of 1 into a tensor's shape.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ExpandDims
Given a tensor input, this operation inserts a dimension of 1 at the dimension index axis of input's shape. The dimension index axis starts at zero; if you specify a negative number for axis it is counted backward from the end.
This operation is useful if you want to add a batch dimension to a single element. For example, if you have a single image of shape [height, width, channels], you can make it a batch of 1 image with expand_dims(image, 0), which will make the shape [1, height, width, channels].
This operation requires that:
-1-input.dims() <= dim <= input.dims()
This operation is related to squeeze(), which removes dimensions of size 1.


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


Creates a dataset that shards the input dataset.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ExperimentalAutoShardDataset
Creates a dataset that shards the input dataset by num_workers, returning a sharded dataset for the index-th worker. This attempts to automatically shard a dataset by examining the Dataset graph and inserting a shard op before the inputs to a reader Dataset (e.g. CSVDataset, TFRecordDataset).
This dataset will throw a NotFound error if we cannot shard the dataset automatically.


Records the bytes size of each element of input_dataset in a StatsAggregator.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ExperimentalBytesProducedStatsDataset


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


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


Returns the cardinality of input_dataset.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ExperimentalDatasetCardinality
Returns the cardinality of input_dataset.


Writes the given dataset to the given file using the TFRecord format.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ExperimentalDatasetToTFRecord


Creates a dataset that batches input elements into a SparseTensor.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ExperimentalDenseToSparseBatchDataset


A substitute for InterleaveDataset on a fixed list of N datasets.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ExperimentalDirectedInterleaveDataset


Creates a dataset that computes a group-by on input_dataset.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ExperimentalGroupByReducerDataset
Creates a dataset that computes a group-by on input_dataset.


Creates a dataset that computes a windowed group-by on input_dataset.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ExperimentalGroupByWindowDataset
//


Creates a dataset that contains the elements of input_dataset ignoring errors.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ExperimentalIgnoreErrorsDataset


Returns the name of the device on which resource has been placed.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ExperimentalIteratorGetDevice


Records the latency of producing input_dataset elements in a StatsAggregator.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ExperimentalLatencyStatsDataset


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


Creates a dataset that fuses mapping with batching.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ExperimentalMapAndBatchDataset
Creates a dataset that applies f to the outputs of input_dataset and then batches batch_size of them.
Unlike a "MapDataset", which applies f sequentially, this dataset invokes up to batch_size * num_parallel_batches copies of f in parallel.


Creates a dataset that applies f to the outputs of input_dataset.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ExperimentalMapDataset


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


Creates a dataset that overrides the maximum intra-op parallelism.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ExperimentalMaxIntraOpParallelismDataset


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


Creates a dataset that applies f to the outputs of input_dataset.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ExperimentalParallelInterleaveDataset
The resulting dataset is similar to the InterleaveDataset, with the exception that if retrieving the next value from a dataset would cause the requester to block, it will skip that input dataset. This dataset is especially useful when loading data from a variable-latency datastores (e.g. HDFS, GCS), as it allows the training step to proceed so long as some data is available.
!! WARNING !! This dataset is not deterministic!


Transforms input_dataset containing Example protos as vectors of DT_STRING into a dataset of Tensor or SparseTensor objects representing the parsed features.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ExperimentalParseExampleDataset


Creates a dataset that uses a custom thread pool to compute input_dataset.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ExperimentalPrivateThreadPoolDataset


Creates a Dataset that returns pseudorandom numbers.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ExperimentalRandomDataset


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


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


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


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


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


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


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


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


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


Creates a dataset that uses a custom thread pool to compute input_dataset.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ExperimentalThreadPoolDataset


Creates a dataset that uses a custom thread pool to compute input_dataset.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ExperimentalThreadPoolHandle


A dataset that splits the elements of its input into multiple elements.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ExperimentalUnbatchDataset


Creates a dataset that contains the unique elements of input_dataset.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ExperimentalUniqueDataset


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


Computes exp(x) - 1 element-wise.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.Expm1
i.e. exp(x) - 1 or e^(x) - 1, where x is the input tensor. e denotes Euler's number and is approximately equal to 2.718281.


Extracts a glimpse from the input tensor.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ExtractGlimpse
Returns a set of windows called glimpses extracted at location offsets from the input tensor. If the windows only partially overlaps the inputs, the non overlapping areas will be filled with random noise.
The result is a 4-D tensor of shape [batch_size, glimpse_height, glimpse_width, channels]. The channels and batch dimensions are the same as that of the input tensor. The height and width of the output windows are specified in the size parameter.
The argument normalized and centered controls how the windows are built:


Extracts a glimpse from the input tensor.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ExtractGlimpseV2
Returns a set of windows called glimpses extracted at location offsets from the input tensor. If the windows only partially overlaps the inputs, the non overlapping areas will be filled with random noise.
The result is a 4-D tensor of shape [batch_size, glimpse_height, glimpse_width, channels]. The channels and batch dimensions are the same as that of the input tensor. The height and width of the output windows are specified in the size parameter.
The argument normalized and centered controls how the windows are built:


Extract patches from images and put them in the "depth" output dimension.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ExtractImagePatches


Extract the shape information of a JPEG-encoded image.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ExtractJpegShape
This op only parses the image header, so it is much faster than DecodeJpeg.


Extract patches from input and put them in the "depth" output dimension. 3D extension of extract_image_patches.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ExtractVolumePatches
The size-related attributes are specified as follows:


Output a fact about factorials.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.Fact


This op is used as a placeholder in If branch functions. It doesn't provide a
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.FakeParam
valid output when run, so must either be removed (e.g. replaced with a function input) or guaranteed not to be used (e.g. if mirroring an intermediate output needed for the gradient computation of the other branch).


Fake-quantize the 'inputs' tensor, type float to 'outputs' tensor of same type.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.FakeQuantWithMinMaxArgs
Attributes
Before quantization, min and max values are adjusted with the following logic. It is suggested to have min <= 0 <= max. If 0 is not in the range of values, the behavior can be unexpected:
Quantization is called fake since the output is still in floating point.


Compute gradients for a FakeQuantWithMinMaxArgs operation.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.FakeQuantWithMinMaxArgsGradient


Fake-quantize the 'inputs' tensor of type float via global float scalars
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.FakeQuantWithMinMaxVars
Fake-quantize the inputs tensor of type float via global float scalars min and max to outputs tensor of same shape as inputs.
Attributes
Before quantization, min and max values are adjusted with the following logic. It is suggested to have min <= 0 <= max. If 0 is not in the range of values, the behavior can be unexpected:
This operation has a gradient and thus allows for training min and max values.


Compute gradients for a FakeQuantWithMinMaxVars operation.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.FakeQuantWithMinMaxVarsGradient


Fake-quantize the 'inputs' tensor of type float via per-channel floats
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.FakeQuantWithMinMaxVarsPerChannel
Fake-quantize the inputs tensor of type float per-channel and one of the shapes: [d], [b, d] [b, h, w, d] via per-channel floats min and max of shape [d] to outputs tensor of same shape as inputs.
Attributes
Before quantization, min and max values are adjusted with the following logic. It is suggested to have min <= 0 <= max. If 0 is not in the range of values, the behavior can be unexpected:
This operation has a gradient and thus allows for training min and max values.


Compute gradients for a FakeQuantWithMinMaxVarsPerChannel operation.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.FakeQuantWithMinMaxVarsPerChannelGradient


Deprecated. Do not use.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.FakeQueue


Fast Fourier transform.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.FFT
Computes the 1-dimensional discrete Fourier transform over the inner-most dimension of input.


2D fast Fourier transform.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.FFT2D
Computes the 2-dimensional discrete Fourier transform over the inner-most 2 dimensions of input.


3D fast Fourier transform.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.FFT3D
Computes the 3-dimensional discrete Fourier transform over the inner-most 3 dimensions of input.


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


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


Creates a tensor filled with a scalar value.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.Fill
This operation creates a tensor of shape dims and fills it with value.
tf.fill differs from tf.constant in a few ways:
Equivalent to np.full


Creates a dataset containing elements of first component of input_dataset having true in the last component.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.FilterByLastComponentDataset


Creates a dataset containing elements of input_dataset matching predicate.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.FilterDataset
The predicate function must return a scalar boolean and accept the following arguments:


Generates fingerprint values.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.Fingerprint
Generates fingerprint values of data.
Fingerprint op considers the first dimension of data as the batch dimension, and output[i] contains the fingerprint value generated from contents in data[i, ...] for all i.
Fingerprint op writes fingerprint values as byte arrays. For example, the default method farmhash64 generates a 64-bit fingerprint value at a time. This 8-byte value is written out as an uint8 array of size 8, in little-endian order.
For example, suppose that data has data type DT_INT32 and shape (2, 3, 4), and that the fingerprint method is farmhash64. In this case, the output shape is (2, 8), where 2 is the batch dimension size of data, and 8 is the size of each fingerprint value in bytes. output[0, :] is generated from 12 integers in data[0, :, :] and similarly output[1, :] is generated from other 12 integers in data[1, :, :].
Note that this op fingerprints the raw underlying buffer, and it does not fingerprint Tensor's metadata such as data type and/or shape. For example, the fingerprint values are invariant under reshapes and bitcasts as long as the batch dimension remain the same:
For string data, one should expect Fingerprint(data) != Fingerprint(ReduceJoin(data)) in general.


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


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


A Reader that outputs fixed-length records from a file.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.FixedLengthRecordReader


A Reader that outputs fixed-length records from a file.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.FixedLengthRecordReaderV2


Generates labels for candidate sampling with a learned unigram distribution.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.FixedUnigramCandidateSampler
A unigram sampler could use a fixed unigram distribution read from a file or passed in as an in-memory array instead of building up the distribution from data on the fly. There is also an option to skew the distribution by applying a distortion power to the weights.
The vocabulary file should be in CSV-like format, with the last field being the weight associated with the word.
For each batch, this op picks a single set of sampled candidate labels.
The advantages of sampling candidates per-batch are simplicity and the possibility of efficient dense matrix multiplication. The disadvantage is that the sampled candidates must be chosen independently of the context and of the true labels.


Creates a dataset that applies f to the outputs of input_dataset.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.FlatMapDataset
Unlike MapDataset, the f in FlatMapDataset is expected to return a Dataset variant, and FlatMapDataset will flatten successive results into a single Dataset.


Returns element-wise largest integer not greater than x.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.Floor


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


Returns element-wise remainder of division. When x < 0 xor y < 0 is
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.FloorMod
true, this follows Python semantics in that the result here is consistent with a flooring divide. E.g. floor(x / y) * y + mod(x, y) = x.


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


Performs fractional average pooling on the input.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.FractionalAvgPool
Fractional average pooling is similar to Fractional max pooling in the pooling region generation step. The only difference is that after pooling regions are generated, a mean operation is performed instead of a max operation in each pooling region.
index 0 1 2 3 4
value 20 5 16 3 7
If the pooling sequence is [0, 2, 4], then 16, at index 2 will be used twice. The result would be [41/3, 26/3] for fractional avg pooling.


Computes gradient of the FractionalAvgPool function.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.FractionalAvgPoolGrad
Unlike FractionalMaxPoolGrad, we don't need to find arg_max for FractionalAvgPoolGrad, we just need to evenly back-propagate each element of out_backprop to those indices that form the same pooling cell. Therefore, we just need to know the shape of original input tensor, instead of the whole tensor.
index 0 1 2 3 4
value 20 5 16 3 7
If the pooling sequence is [0, 2, 4], then 16, at index 2 will be used twice. The result would be [41/3, 26/3] for fractional avg pooling.


Performs fractional max pooling on the input.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.FractionalMaxPool
Fractional max pooling is slightly different than regular max pooling. In regular max pooling, you downsize an input set by taking the maximum value of smaller N x N subsections of the set (often 2x2), and try to reduce the set by a factor of N, where N is an integer. Fractional max pooling, as you might expect from the word "fractional", means that the overall reduction ratio N does not have to be an integer.
The sizes of the pooling regions are generated randomly but are fairly uniform. For example, let's look at the height dimension, and the constraints on the list of rows that will be pool boundaries.
First we define the following:
Then, row_pooling_sequence should satisfy:
For more details on fractional max pooling, see this paper: Benjamin Graham, Fractional Max-Pooling
index 0 1 2 3 4
value 20 5 16 3 7
If the pooling sequence is [0, 2, 4], then 16, at index 2 will be used twice. The result would be [20, 16] for fractional max pooling.


Computes gradient of the FractionalMaxPool function.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.FractionalMaxPoolGrad
index 0 1 2 3 4
value 20 5 16 3 7
If the pooling sequence is [0, 2, 4], then 16, at index 2 will be used twice. The result would be [20, 16] for fractional max pooling.


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


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


Batch normalization.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.FusedBatchNorm
Note that the size of 4D Tensors are defined by either "NHWC" or "NCHW". The size of 1D Tensors matches the dimension C of the 4D Tensors.


Gradient for batch normalization.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.FusedBatchNormGrad
Note that the size of 4D Tensors are defined by either "NHWC" or "NCHW". The size of 1D Tensors matches the dimension C of the 4D Tensors.


Gradient for batch normalization.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.FusedBatchNormGradV2
Note that the size of 4D Tensors are defined by either "NHWC" or "NCHW". The size of 1D Tensors matches the dimension C of the 4D Tensors.


Gradient for batch normalization.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.FusedBatchNormGradV3
Note that the size of 4D Tensors are defined by either "NHWC" or "NCHW". The size of 1D Tensors matches the dimension C of the 4D Tensors.


Batch normalization.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.FusedBatchNormV2
Note that the size of 4D Tensors are defined by either "NHWC" or "NCHW". The size of 1D Tensors matches the dimension C of the 4D Tensors.


Batch normalization.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.FusedBatchNormV3
Note that the size of 4D Tensors are defined by either "NHWC" or "NCHW". The size of 1D Tensors matches the dimension C of the 4D Tensors.


Performs a padding as a preprocess during a convolution.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.FusedPadConv2D
Similar to FusedResizeAndPadConv2d, this op allows for an optimized implementation where the spatial padding transformation stage is fused with the im2col lookup, but in this case without the bilinear filtering required for resizing. Fusing the padding prevents the need to write out the intermediate results as whole tensors, reducing memory pressure, and we can get some latency gains by merging the transformation calculations. The data_format attribute for Conv2D isn't supported by this op, and 'NHWC' order is used instead. Internally this op uses a single per-graph scratch buffer, which means that it will block if multiple versions are being run in parallel. This is because this operator is primarily an optimization to minimize memory usage.


Performs a resize and padding as a preprocess during a convolution.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.FusedResizeAndPadConv2D
It's often possible to do spatial transformations more efficiently as part of the packing stage of a convolution, so this op allows for an optimized implementation where these stages are fused together. This prevents the need to write out the intermediate results as whole tensors, reducing memory pressure, and we can get some latency gains by merging the transformation calculations. The data_format attribute for Conv2D isn't supported by this op, and defaults to 'NHWC' order. Internally this op uses a single per-graph scratch buffer, which means that it will block if multiple versions are being run in parallel. This is because this operator is primarily an optimization to minimize memory usage.


Gather slices from params according to indices.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.Gather
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:
If indices is a permutation and len(indices) == params.shape[0] then this operation will permute params accordingly.
validate_indices: DEPRECATED. If this operation is assigned to CPU, values in indices are always validated to be within range. If assigned to GPU, out-of-bound indices result in safe but unspecified behavior, which may include raising an error.


Gather slices from params into a Tensor with shape specified by indices.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.GatherNd
indices is a K-dimensional integer tensor, best thought of as a (K-1)-dimensional tensor of indices into params, where each element defines a slice of params:
Whereas in tf.gather indices defines slices into the axis dimension of params, in tf.gather_nd, indices defines slices into the first N dimensions of params, where N = indices.shape[-1].
The last dimension of indices can be at most the rank of params:
The last dimension of indices corresponds to elements (if indices.shape[-1] == params.rank) or slices (if indices.shape[-1] < params.rank) along dimension indices.shape[-1] of params. The output tensor has shape
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, a 0 is stored in the corresponding output value.
Some examples below.
Simple indexing into a matrix:
Slice indexing into a matrix:
Indexing into a 3-tensor:
Batched indexing into a matrix:
Batched slice indexing into a matrix:
Batched indexing into a 3-tensor:
See also tf.gather and tf.batch_gather.


Gather slices from params axis axis according to indices.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.GatherV2
indices must be an integer tensor of any dimension (usually 0-D or 1-D). Produces an output tensor with shape params.shape[:axis] + indices.shape[batch_dims:] + params.shape[axis + 1:] where:
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, a 0 is stored in the corresponding output value.
See also tf.batch_gather and tf.gather_nd.


This op produces Region of Interests from given bounding boxes(bbox_deltas) encoded wrt anchors according to eq.2 in arXiv:1506.01497
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.GenerateBoundingBoxProposals


Given a path to new and old vocabulary files, returns a remapping Tensor of
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.GenerateVocabRemapping
length num_new_vocab, where remapping[i] contains the row number in the old vocabulary that corresponds to row i in the new vocabulary (starting at line new_vocab_offset and up to num_new_vocab entities), or -1 if entry i in the new vocabulary is not in the old vocabulary. The old vocabulary is constrained to the first old_vocab_size entries if old_vocab_size is not the default value of -1.
num_vocab_offset enables use in the partitioned variable case, and should generally be set through examining partitioning info. The format of the files should be a text file, with each line containing a single entity within the vocabulary.
For example, with new_vocab_file a text file containing each of the following elements on a single line: [f0, f1, f2, f3], old_vocab_file = [f1, f0, f3], num_new_vocab = 3, new_vocab_offset = 1, the returned remapping would be [0, -1, 2].
The op also returns a count of how many entries in the new vocabulary were present in the old vocabulary, which is used to calculate the number of values to initialize in a weight matrix remapping
This functionality can be used to remap both row vocabularies (typically, features) and column vocabularies (typically, classes) from TensorFlow checkpoints. Note that the partitioning logic relies on contiguous vocabularies corresponding to div-partitioned variables. Moreover, the underlying remapping uses an IndexTable (as opposed to an inexact CuckooTable), so client code should use the corresponding index_table_from_file() as the FeatureColumn framework does (as opposed to tf.feature_to_id(), which uses a CuckooTable).


Creates a dataset that invokes a function to generate elements.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.GeneratorDataset


Store the input tensor in the state of the current session.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.GetSessionHandle


Store the input tensor in the state of the current session.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.GetSessionHandleV2


Get the value of the tensor specified by its handle.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.GetSessionTensor


Returns the truth value of (x > y) element-wise.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.Greater


Returns the truth value of (x >= y) element-wise.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.GreaterEqual


Creates a dataset that computes a group-by on input_dataset.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.GroupByReducerDataset
Creates a dataset that computes a group-by on input_dataset.


Creates a dataset that computes a windowed group-by on input_dataset.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.GroupByWindowDataset
//


Computes the GRU cell forward propagation for 1 time step.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.GRUBlockCell
Args x: Input to the GRU cell. h_prev: State input from the previous GRU cell. w_ru: Weight matrix for the reset and update gate. w_c: Weight matrix for the cell connection gate. b_ru: Bias vector for the reset and update gate. b_c: Bias vector for the cell connection gate.
Returns r: Output of the reset gate. u: Output of the update gate. c: Output of the cell connection gate. h: Current state of the GRU cell.
Note on notation of the variables:
Concatenation of a and b is represented by a_b Element-wise dot product of a and b is represented by ab Element-wise dot product is represented by \circ Matrix multiplication is represented by *
Biases are initialized with : b_ru - constant_initializer(1.0) b_c - constant_initializer(0.0)
This kernel op implements the following mathematical equations:


Computes the GRU cell back-propagation for 1 time step.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.GRUBlockCellGrad
Args x: Input to the GRU cell. h_prev: State input from the previous GRU cell. w_ru: Weight matrix for the reset and update gate. w_c: Weight matrix for the cell connection gate. b_ru: Bias vector for the reset and update gate. b_c: Bias vector for the cell connection gate. r: Output of the reset gate. u: Output of the update gate. c: Output of the cell connection gate. d_h: Gradients of the h_new wrt to objective function.
Returns d_x: Gradients of the x wrt to objective function. d_h_prev: Gradients of the h wrt to objective function. d_c_bar Gradients of the c_bar wrt to objective function. d_r_bar_u_bar Gradients of the r_bar & u_bar wrt to objective function.
This kernel op implements the following mathematical equations:
Note on notation of the variables:
Concatenation of a and b is represented by a_b Element-wise dot product of a and b is represented by ab Element-wise dot product is represented by \circ Matrix multiplication is represented by *
Additional notes for clarity:
w_ru can be segmented into 4 different matrices.
Similarly, w_c can be segmented into 2 different matrices.
Same goes for biases.
Another note on notation:
Mathematics behind the Gradients below:
Below calculation is performed in the python wrapper for the Gradients (not in the gradient kernel.)


Gives a guarantee to the TF runtime that the input tensor is a constant.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.GuaranteeConst
The runtime is then free to make optimizations based on this.
Only accepts value typed tensors as inputs and rejects resource variable handles as input.
Returns the input tensor without modification.


Creates a non-initialized hash table.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.HashTable
This op creates a hash table, specifying the type of its keys and values. Before using the table you will have to initialize it. After initialization the table will be immutable.


Creates a non-initialized hash table.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.HashTableV2
This op creates a hash table, specifying the type of its keys and values. Before using the table you will have to initialize it. After initialization the table will be immutable.


Return histogram of values.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.HistogramFixedWidth
Given the tensor values, this operation returns a rank 1 histogram counting the number of entries in values that fall into every bin. The bins are equal width and determined by the arguments value_range and nbins.


Outputs a Summary protocol buffer with a histogram.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.HistogramSummary
The generated Summary has one summary value containing a histogram for values.
This op reports an InvalidArgument error if any value is not finite.


Convert one or more images from HSV to RGB.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.HSVToRGB
Outputs a tensor of the same shape as the images tensor, containing the RGB value of the pixels. The output is only well defined if the value in images are in [0,1].
See rgb_to_hsv for a description of the HSV encoding.


Return a tensor with the same shape and contents as the input tensor or value.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.Identity


Returns a list of tensors with the same shapes and contents as the input
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.IdentityN
tensors.
This op can be used to override the gradient for complicated functions. For example, suppose y = f(x) and we wish to apply a custom function g for backprop such that dx = g(dy). In Python,


A Reader that outputs the queued work as both the key and value.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.IdentityReader
To use, enqueue strings in a Queue. ReaderRead will take the front work string and output (work, work).


A Reader that outputs the queued work as both the key and value.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.IdentityReaderV2
To use, enqueue strings in a Queue. ReaderRead will take the front work string and output (work, work).


output = cond ? then_branch(input) : else_branch(input)
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.If


Inverse fast Fourier transform.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.IFFT
Computes the inverse 1-dimensional discrete Fourier transform over the inner-most dimension of input.


Inverse 2D fast Fourier transform.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.IFFT2D
Computes the inverse 2-dimensional discrete Fourier transform over the inner-most 2 dimensions of input.


Inverse 3D fast Fourier transform.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.IFFT3D
Computes the inverse 3-dimensional discrete Fourier transform over the inner-most 3 dimensions of input.


Compute the lower regularized incomplete Gamma function P(a, x).
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.Igamma
The lower regularized incomplete Gamma function is defined as:
\(P(a, x) = gamma(a, x) / Gamma(a) = 1 - Q(a, x)\)
where
\(gamma(a, x) = \\int_{0}^{x} t^{a-1} exp(-t) dt\)
is the lower incomplete Gamma function.
Note, above Q(a, x) (Igammac) is the upper regularized complete Gamma function.


Compute the upper regularized incomplete Gamma function Q(a, x).
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.Igammac
The upper regularized incomplete Gamma function is defined as:
\(Q(a, x) = Gamma(a, x) / Gamma(a) = 1 - P(a, x)\)
where
\(Gamma(a, x) = int_{x}^{\infty} t^{a-1} exp(-t) dt\)
is the upper incomplete Gama function.
Note, above P(a, x) (Igamma) is the lower regularized complete Gamma function.


Computes the gradient of igamma(a, x) wrt a.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.IgammaGradA


Creates a dataset that contains the elements of input_dataset ignoring errors.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.IgnoreErrorsDataset


Returns the imaginary part of a complex number.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.Imag
Given a tensor input of complex numbers, this operation returns a tensor of type float that is the imaginary 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 and b is the imaginary part returned by this operation.


Applies the given transform to each of the images.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ImageProjectiveTransformV2
If one row of transforms is [a0, a1, a2, b0, b1, b2, c0, c1], then it maps the output point (x, y) to a transformed input point (x', y') = ((a0 x + a1 y + a2) / k, (b0 x + b1 y + b2) / k), where k = c0 x + c1 y + 1. If the transformed point lays outside of the input image, the output pixel is set to 0.


Applies the given transform to each of the images.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ImageProjectiveTransformV3
If one row of transforms is [a0, a1, a2, b0, b1, b2, c0, c1], then it maps the output point (x, y) to a transformed input point (x', y') = ((a0 x + a1 y + a2) / k, (b0 x + b1 y + b2) / k), where k = c0 x + c1 y + 1. If the transformed point lays outside of the input image, the output pixel is set to fill_value.


Outputs a Summary protocol buffer with images.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ImageSummary
The summary has up to max_images summary values containing images. The images are built from tensor which must be 4-D with shape [batch_size, height, width, channels] and where channels can be:
The images have the same number of channels as the input tensor. For float input, the values are normalized one image at a time to fit in the range [0, 255]. uint8 values are unchanged. The op uses two different normalization algorithms:
If the input values are all positive, they are rescaled so the largest one is 255.
If any input value is negative, the values are shifted so input value 0.0 is at 127. They are then rescaled so that either the smallest value is 0, or the largest one is 255.
The tag argument is a scalar Tensor of type string. It is used to build the tag of the summary values:
The bad_color argument is the color to use in the generated images for non-finite input values. It is a uint8 1-D tensor of length channels. Each element must be in the range [0, 255] (It represents the value of a pixel in the output image). Non-finite values in the input tensor are replaced by this tensor in the output image. The default value is the color red.


Returns immutable tensor from memory region.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ImmutableConst
The current implementation memmaps the tensor from a file.


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


A placeholder op for a value that will be fed into the computation.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.InfeedDequeue


Fetches multiple values from infeed as an XLA tuple.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.InfeedDequeueTuple


An op which feeds a single Tensor value into the computation.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.InfeedEnqueue


An op which enqueues prelinearized buffer into TPU infeed.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.InfeedEnqueuePrelinearizedBuffer


Feeds multiple Tensor values into the computation as an XLA tuple.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.InfeedEnqueueTuple


Table initializer that takes two tensors for keys and values respectively.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.InitializeTable


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


Initializes a table from a text file.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.InitializeTableFromTextFile
It inserts one key-value pair into the table for each line of the file. The key and value is extracted from the whole line content, elements from the split line based on delimiter or the line number (starting from zero). Where to extract the key and value from a line is specified by key_index and value_index.


Initializes a table from a text file.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.InitializeTableFromTextFileV2
It inserts one key-value pair into the table for each line of the file. The key and value is extracted from the whole line content, elements from the split line based on delimiter or the line number (starting from zero). Where to extract the key and value from a line is specified by key_index and value_index.


Table initializer that takes two tensors for keys and values respectively.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.InitializeTableV2


Adds v into specified rows of x.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.InplaceAdd
Computes y = x; y[i, :] += v; return y.


Subtracts v into specified rows of x.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.InplaceSub
Computes y = x; y[i, :] -= v; return y.


Updates specified rows 'i' with values 'v'.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.InplaceUpdate
Computes x[i, :] = v; return x.
Originally this function is mutative however for compilation we make this operation create / operate on a copy of x.


Creates a dataset that applies f to the outputs of input_dataset.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.InterleaveDataset
Unlike MapDataset, the f in InterleaveDataset is expected to return a Dataset variant, and InterleaveDataset will flatten successive results into a single Dataset. Unlike FlatMapDataset, InterleaveDataset will interleave sequences of up to block_length consecutive elements from cycle_length input elements.


Says whether the targets are in the top K predictions.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.InTopK
This outputs a batch_size bool array, an entry out[i] is true if the prediction for the target class is among the top k predictions among all predictions for example i. Note that the behavior of InTopK differs from the TopK op in its handling of ties; if multiple classes have the same prediction value and straddle the top-k boundary, all of those classes are considered to be in the top k.
More formally, let
\(predictions_i\) be the predictions for all classes for example i, \(targets_i\) be the target class for example i, \(out_i\) be the output for example i,


Says whether the targets are in the top K predictions.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.InTopKV2
This outputs a batch_size bool array, an entry out[i] is true if the prediction for the target class is among the top k predictions among all predictions for example i. Note that the behavior of InTopK differs from the TopK op in its handling of ties; if multiple classes have the same prediction value and straddle the top-k boundary, all of those classes are considered to be in the top k.
More formally, let
\(predictions_i\) be the predictions for all classes for example i, \(targets_i\) be the target class for example i, \(out_i\) be the output for example i,


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


Invert (flip) each bit of supported types; for example, type uint8 value 01010101 becomes 10101010.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.Invert
Flip each bit of supported types. For example, type int8 (decimal 2) binary 00000010 becomes (decimal -3) binary 11111101. This operation is performed on each element of the tensor argument x.


Computes the inverse permutation of a tensor.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.InvertPermutation
This operation computes the inverse of an index permutation. It takes a 1-D integer tensor x, which represents the indices of a zero-based array, and swaps each value with its index position. In other words, for an output tensor y and an input tensor x, this operation computes the following:
y[x[i]] = i for i in [0, 1, ..., len(x) - 1]
The values must include 0. There can be no duplicate values or negative values.


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.InvGrad
Specifically, grad = -dy * y*y, where y = 1/x, and dy is the corresponding input gradient.


Inverse real-valued fast Fourier transform.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.IRFFT
Computes the inverse 1-dimensional discrete Fourier transform of a real-valued signal over the inner-most dimension of input.
The inner-most dimension of input is assumed to be the result of RFFT: the fft_length / 2 + 1 unique components of the DFT of a real-valued signal. If fft_length is not provided, it is computed from the size of the inner-most dimension of input (fft_length = 2 * (inner - 1)). If the FFT length used to compute input is odd, it should be provided since it cannot be inferred properly.
Along the axis IRFFT is computed on, if fft_length / 2 + 1 is smaller than the corresponding dimension of input, the dimension is cropped. If it is larger, the dimension is padded with zeros.


Inverse 2D real-valued fast Fourier transform.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.IRFFT2D
Computes the inverse 2-dimensional discrete Fourier transform of a real-valued signal over the inner-most 2 dimensions of input.
The inner-most 2 dimensions of input are assumed to be the result of RFFT2D: The inner-most dimension contains the fft_length / 2 + 1 unique components of the DFT of a real-valued signal. If fft_length is not provided, it is computed from the size of the inner-most 2 dimensions of input. If the FFT length used to compute input is odd, it should be provided since it cannot be inferred properly.
Along each axis IRFFT2D is computed on, if fft_length (or fft_length / 2 + 1 for the inner-most dimension) is smaller than the corresponding dimension of input, the dimension is cropped. If it is larger, the dimension is padded with zeros.


Inverse 3D real-valued fast Fourier transform.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.IRFFT3D
Computes the inverse 3-dimensional discrete Fourier transform of a real-valued signal over the inner-most 3 dimensions of input.
The inner-most 3 dimensions of input are assumed to be the result of RFFT3D: The inner-most dimension contains the fft_length / 2 + 1 unique components of the DFT of a real-valued signal. If fft_length is not provided, it is computed from the size of the inner-most 3 dimensions of input. If the FFT length used to compute input is odd, it should be provided since it cannot be inferred properly.
Along each axis IRFFT3D is computed on, if fft_length (or fft_length / 2 + 1 for the inner-most dimension) is smaller than the corresponding dimension of input, the dimension is cropped. If it is larger, the dimension is padded with zeros.


Checks whether a tree ensemble has been initialized.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.IsBoostedTreesEnsembleInitialized


Checks whether a quantile stream has been initialized.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.IsBoostedTreesQuantileStreamResourceInitialized
An Op that checks if quantile stream resource is initialized.


Returns which elements of x are finite.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.IsFinite
Equivalent to np.isfinite


Returns which elements of x are Inf.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.IsInf
Equivalent to np.isinf


Returns which elements of x are NaN.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.IsNan
Equivalent to np.isnan


Solves a batch of isotonic regression problems.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.IsotonicRegression


Checks whether a tensor has been initialized.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.IsVariableInitialized
Outputs boolean scalar indicating whether the tensor has been initialized.


A container for an iterator resource.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.Iterator


Converts the given string representing a handle to an iterator to a resource.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.IteratorFromStringHandle


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


Returns the name of the device on which resource has been placed.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.IteratorGetDevice


Gets the next output from the given iterator .
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.IteratorGetNext


Gets the next output from the given iterator as an Optional variant.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.IteratorGetNextAsOptional


Gets the next output from the given iterator.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.IteratorGetNextSync
This operation is a synchronous version IteratorGetNext. It should only be used in situations where the iterator does not block the calling thread, or where the calling thread is not a member of the thread pool used to execute parallel operations (e.g. in eager mode).


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


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


L2 Loss.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.L2Loss
Computes half the L2 norm of a tensor without the sqrt:


Records the latency of producing input_dataset elements in a StatsAggregator.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.LatencyStatsDataset


Computes rectified linear: max(features, features * alpha).
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.LeakyRelu


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


Generates labels for candidate sampling with a learned unigram distribution.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.LearnedUnigramCandidateSampler
See explanations of candidate sampling and the data formats at go/candidate-sampling.
For each batch, this op picks a single set of sampled candidate labels.
The advantages of sampling candidates per-batch are simplicity and the possibility of efficient dense matrix multiplication. The disadvantage is that the sampled candidates must be chosen independently of the context and of the true labels.


Elementwise computes the bitwise left-shift of x and y.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.LeftShift
If y is negative, or greater than or equal to the width of x in bits the result is implementation defined.


Creates a dataset that applies f to the outputs of input_dataset.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.LegacyParallelInterleaveDatasetV2
The resulting dataset is similar to the InterleaveDataset, with the exception that if retrieving the next value from a dataset would cause the requester to block, it will skip that input dataset. This dataset is especially useful when loading data from a variable-latency datastores (e.g. HDFS, GCS), as it allows the training step to proceed so long as some data is available.
!! WARNING !! This dataset is not deterministic!


Returns the truth value of (x < y) element-wise.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.Less


Returns the truth value of (x <= y) element-wise.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.LessEqual


Computes the log of the absolute value of Gamma(x) element-wise.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.Lgamma
For positive numbers, this function computes log((input - 1)!) for every element in the tensor. lgamma(5) = log((5-1)!) = log(4!) = log(24) = 3.1780539


Generates values in an interval.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.LinSpace
A sequence of num evenly-spaced values are generated beginning at start. If num > 1, the values in the sequence increase by stop - start / num - 1, so that the last one is exactly stop.


Computes the difference between two lists of numbers or strings.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.ListDiff
Given a list x and a list y, this operation returns a list out that represents all values that are in x but not in y. The returned list out is sorted in the same order that the numbers appear in x (duplicates are preserved). This operation also returns a list idx that represents the position of each out element in x. In other words:
out[i] = x[idx[i]] for i in [0, 1, ..., len(out) - 1]
For example, given this input:
This operation would return:


Creates a dataset that emits the key-value pairs in one or more LMDB files.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.LMDBDataset
The Lightning Memory-Mapped Database Manager, or LMDB, is an embedded binary key-value database. This dataset can read the contents of LMDB database files, the names of which generally have the .mdb suffix.
Each output element consists of a key-value pair represented as a pair of scalar string Tensors, where the first Tensor contains the key and the second Tensor contains the value.
LMDB uses different file formats on big- and little-endian machines. LMDBDataset can only read files in the format of the host machine.


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


Loads a 2-D (matrix) Tensor with name old_tensor_name from the checkpoint
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.LoadAndRemapMatrix
at ckpt_path and potentially reorders its rows and columns using the specified remappings.
Most users should use one of the wrapper initializers (such as tf.contrib.framework.load_and_remap_matrix_initializer) instead of this function directly.
The remappings are 1-D tensors with the following properties:
(r * num_cols) + (c * num_rows) - (r * c) == len(initializing_values)
The remapping tensors can be generated using the GenerateVocabRemapping op.
As an example, with row_remapping = [1, 0, -1], col_remapping = [0, 2, -1], initializing_values = [0.5, -0.5, 0.25, -0.25, 42], and w(i, j) representing the value from row i, column j of the old tensor in the checkpoint, the output matrix will look like the following:
[[w(1, 0), w(1, 2), 0.5], [w(0, 0), w(0, 2), -0.5], [0.25, -0.25, 42]]


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


Load Adadelta embedding parameters.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.LoadTPUEmbeddingAdadeltaParameters
An op that loads optimization parameters into HBM for embedding. Must be preceded by a ConfigureTPUEmbeddingHost op that sets up the correct embedding table configuration. For example, this op is used to install parameters that are loaded from a checkpoint before a training loop is executed.


Load Adadelta parameters with debug support.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.LoadTPUEmbeddingAdadeltaParametersGradAccumDebug
An op that loads optimization parameters into HBM for embedding. Must be preceded by a ConfigureTPUEmbeddingHost op that sets up the correct embedding table configuration. For example, this op is used to install parameters that are loaded from a checkpoint before a training loop is executed.


Load Adagrad embedding parameters.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.LoadTPUEmbeddingAdagradParameters
An op that loads optimization parameters into HBM for embedding. Must be preceded by a ConfigureTPUEmbeddingHost op that sets up the correct embedding table configuration. For example, this op is used to install parameters that are loaded from a checkpoint before a training loop is executed.


Load Adagrad embedding parameters with debug support.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.LoadTPUEmbeddingAdagradParametersGradAccumDebug
An op that loads optimization parameters into HBM for embedding. Must be preceded by a ConfigureTPUEmbeddingHost op that sets up the correct embedding table configuration. For example, this op is used to install parameters that are loaded from a checkpoint before a training loop is executed.


Load ADAM embedding parameters.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.LoadTPUEmbeddingADAMParameters
An op that loads optimization parameters into HBM for embedding. Must be preceded by a ConfigureTPUEmbeddingHost op that sets up the correct embedding table configuration. For example, this op is used to install parameters that are loaded from a checkpoint before a training loop is executed.


Load ADAM embedding parameters with debug support.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.LoadTPUEmbeddingADAMParametersGradAccumDebug
An op that loads optimization parameters into HBM for embedding. Must be preceded by a ConfigureTPUEmbeddingHost op that sets up the correct embedding table configuration. For example, this op is used to install parameters that are loaded from a checkpoint before a training loop is executed.


Load centered RMSProp embedding parameters.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.LoadTPUEmbeddingCenteredRMSPropParameters
An op that loads optimization parameters into HBM for embedding. Must be preceded by a ConfigureTPUEmbeddingHost op that sets up the correct embedding table configuration. For example, this op is used to install parameters that are loaded from a checkpoint before a training loop is executed.


Load FTRL embedding parameters.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.raw_ops.LoadTPUEmbeddingFTRLParameters
An op that loads optimization parameters into HBM for embedding. Must be preceded by a ConfigureTPUEmbeddingHost op that sets up the correct embedding table configuration. For example, this op is used to install parameters that are loaded from a checkpoint before a training loop is executed.