doc_content
stringlengths 1
386k
| doc_id
stringlengths 5
188
|
---|---|
tf.raw_ops.DeleteMultiDeviceIterator A container for an iterator resource. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.DeleteMultiDeviceIterator
tf.raw_ops.DeleteMultiDeviceIterator(
multi_device_iterator, iterators, deleter, name=None
)
Args
multi_device_iterator A Tensor of type resource. A handle to the multi device iterator to delete.
iterators A list of Tensor objects with type resource. A list of iterator handles (unused). This is added so that automatic control dependencies get added during function tracing that ensure this op runs after all the dependent iterators are deleted.
deleter A Tensor of type variant. A variant deleter.
name A name for the operation (optional).
Returns The created Operation. | tensorflow.raw_ops.deletemultideviceiterator |
tf.raw_ops.DeleteRandomSeedGenerator View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.DeleteRandomSeedGenerator
tf.raw_ops.DeleteRandomSeedGenerator(
handle, deleter, name=None
)
Args
handle A Tensor of type resource.
deleter A Tensor of type variant.
name A name for the operation (optional).
Returns The created Operation. | tensorflow.raw_ops.deleterandomseedgenerator |
tf.raw_ops.DeleteSeedGenerator View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.DeleteSeedGenerator
tf.raw_ops.DeleteSeedGenerator(
handle, deleter, name=None
)
Args
handle A Tensor of type resource.
deleter A Tensor of type variant.
name A name for the operation (optional).
Returns The created Operation. | tensorflow.raw_ops.deleteseedgenerator |
tf.raw_ops.DeleteSessionTensor Delete the tensor specified by its handle in the session. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.DeleteSessionTensor
tf.raw_ops.DeleteSessionTensor(
handle, name=None
)
Args
handle A Tensor of type string. The handle for a tensor stored in the session state.
name A name for the operation (optional).
Returns The created Operation. | tensorflow.raw_ops.deletesessiontensor |
tf.raw_ops.DenseBincount Counts the number of occurrences of each value in an integer array. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.DenseBincount
tf.raw_ops.DenseBincount(
input, size, weights, binary_output=False, name=None
)
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.
Args
input A Tensor. Must be one of the following types: int32, int64. 1D or 2D int Tensor.
size A Tensor. Must have the same type as input. non-negative int scalar Tensor.
weights A Tensor. Must be one of the following types: int32, int64, float32, float64. is an int32, int64, float32, or float64 Tensor with the same shape as arr, or a length-0 Tensor, in which case it acts as all weights equal to 1.
binary_output An optional bool. Defaults to False. bool; Whether the kernel should count the appearance or number of occurrences.
name A name for the operation (optional).
Returns A Tensor. Has the same type as weights. | tensorflow.raw_ops.densebincount |
tf.raw_ops.DenseCountSparseOutput Performs sparse-output bin counting for a tf.tensor input. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.DenseCountSparseOutput
tf.raw_ops.DenseCountSparseOutput(
values, weights, binary_output, minlength=-1, maxlength=-1, name=None
)
Counts the number of times each value occurs in the input.
Args
values A Tensor. Must be one of the following types: int32, int64. Tensor containing data to count.
weights A Tensor. Must be one of the following types: int32, int64, float32, float64. A Tensor of the same shape as indices containing per-index weight values. May also be the empty tensor if no weights are used.
binary_output A bool. Whether to output the number of occurrences of each value or 1.
minlength An optional int that is >= -1. Defaults to -1. Minimum value to count. Can be set to -1 for no minimum.
maxlength An optional int that is >= -1. Defaults to -1. Maximum value to count. Can be set to -1 for no maximum.
name A name for the operation (optional).
Returns A tuple of Tensor objects (output_indices, output_values, output_dense_shape). output_indices A Tensor of type int64.
output_values A Tensor. Has the same type as weights.
output_dense_shape A Tensor of type int64. | tensorflow.raw_ops.densecountsparseoutput |
tf.raw_ops.DenseToCSRSparseMatrix Converts a dense tensor to a (possibly batched) CSRSparseMatrix. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.DenseToCSRSparseMatrix
tf.raw_ops.DenseToCSRSparseMatrix(
dense_input, indices, name=None
)
Args
dense_input A Tensor. Must be one of the following types: float32, float64, complex64, complex128. A Dense tensor.
indices A Tensor of type int64. Indices of nonzero elements.
name A name for the operation (optional).
Returns A Tensor of type variant. | tensorflow.raw_ops.densetocsrsparsematrix |
tf.raw_ops.DenseToDenseSetOperation Applies set operation along last dimension of 2 Tensor inputs. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.DenseToDenseSetOperation
tf.raw_ops.DenseToDenseSetOperation(
set1, set2, set_operation, validate_indices=True, name=None
)
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.
Args
set1 A Tensor. Must be one of the following types: int8, int16, int32, int64, uint8, uint16, string. Tensor with rank n. 1st n-1 dimensions must be the same as set2. Dimension n contains values in a set, duplicates are allowed but ignored.
set2 A Tensor. Must have the same type as set1. Tensor with rank n. 1st n-1 dimensions must be the same as set1. Dimension n contains values in a set, duplicates are allowed but ignored.
set_operation A string.
validate_indices An optional bool. Defaults to True.
name A name for the operation (optional).
Returns A tuple of Tensor objects (result_indices, result_values, result_shape). result_indices A Tensor of type int64.
result_values A Tensor. Has the same type as set1.
result_shape A Tensor of type int64. | tensorflow.raw_ops.densetodensesetoperation |
tf.raw_ops.DenseToSparseBatchDataset Creates a dataset that batches input elements into a SparseTensor. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.DenseToSparseBatchDataset
tf.raw_ops.DenseToSparseBatchDataset(
input_dataset, batch_size, row_shape, output_types, output_shapes, name=None
)
Args
input_dataset A Tensor of type variant. A handle to an input dataset. Must have a single component.
batch_size A Tensor of type int64. A scalar representing the number of elements to accumulate in a batch.
row_shape A Tensor of type int64. A vector representing the dense shape of each row in the produced SparseTensor. The shape may be partially specified, using -1 to indicate that a particular dimension should use the maximum size of all batch elements.
output_types A list of tf.DTypes that has length >= 1.
output_shapes A list of shapes (each a tf.TensorShape or list of ints) that has length >= 1.
name A name for the operation (optional).
Returns A Tensor of type variant. | tensorflow.raw_ops.densetosparsebatchdataset |
tf.raw_ops.DenseToSparseSetOperation Applies set operation along last dimension of Tensor and SparseTensor. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.DenseToSparseSetOperation
tf.raw_ops.DenseToSparseSetOperation(
set1, set2_indices, set2_values, set2_shape, set_operation,
validate_indices=True, name=None
)
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.
Args
set1 A Tensor. Must be one of the following types: int8, int16, int32, int64, uint8, uint16, string. Tensor with rank n. 1st n-1 dimensions must be the same as set2. Dimension n contains values in a set, duplicates are allowed but ignored.
set2_indices A Tensor of type int64. 2D Tensor, indices of a SparseTensor. Must be in row-major order.
set2_values A Tensor. Must have the same type as set1. 1D Tensor, values of a SparseTensor. Must be in row-major order.
set2_shape A Tensor of type int64. 1D Tensor, shape of a SparseTensor. set2_shape[0...n-1] must be the same as the 1st n-1 dimensions of set1, result_shape[n] is the max set size across n-1 dimensions.
set_operation A string.
validate_indices An optional bool. Defaults to True.
name A name for the operation (optional).
Returns A tuple of Tensor objects (result_indices, result_values, result_shape). result_indices A Tensor of type int64.
result_values A Tensor. Has the same type as set1.
result_shape A Tensor of type int64. | tensorflow.raw_ops.densetosparsesetoperation |
tf.raw_ops.DepthToSpace DepthToSpace for tensors of type T. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.DepthToSpace
tf.raw_ops.DepthToSpace(
input, block_size, data_format='NHWC', name=None
)
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. Chunks of data of size block_size * block_size from depth are rearranged into non-overlapping blocks of size block_size x block_size
The width the output tensor is input_depth * block_size, whereas the height is input_height * block_size. The Y, X coordinates within each block of the output image are determined by the high order component of the input channel index. The depth of the input tensor must be divisible by block_size * block_size. The data_format attr specifies the layout of the input and output tensors with the following options: "NHWC": [ batch, height, width, channels ] "NCHW": [ batch, channels, height, width ] "NCHW_VECT_C": qint8 [ batch, channels / 4, height, width, 4 ] It is useful to consider the operation as transforming a 6-D Tensor. e.g. for data_format = NHWC, Each element in the input tensor can be specified via 6 coordinates, ordered by decreasing memory layout significance as: n,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: x = [[[[1, 2, 3, 4]]]]
This operation will output a tensor of shape [1, 2, 2, 1]: [[[[1], [2]],
[[3], [4]]]]
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. x = [[[[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]]]]
This operation, for block size of 2, will return the following tensor of shape [1, 2, 2, 3] [[[[1, 2, 3], [4, 5, 6]],
[[7, 8, 9], [10, 11, 12]]]]
Similarly, for the following input of shape [1 2 2 4], and a block size of 2: x = [[[[1, 2, 3, 4],
[5, 6, 7, 8]],
[[9, 10, 11, 12],
[13, 14, 15, 16]]]]
the operator will return the following tensor of shape [1 4 4 1]: x = [[[ [1], [2], [5], [6]],
[ [3], [4], [7], [8]],
[ [9], [10], [13], [14]],
[ [11], [12], [15], [16]]]]
Args
input A Tensor.
block_size An int that is >= 2. The size of the spatial block, same as in Space2Depth.
data_format An optional string from: "NHWC", "NCHW", "NCHW_VECT_C". Defaults to "NHWC".
name A name for the operation (optional).
Returns A Tensor. Has the same type as input. | tensorflow.raw_ops.depthtospace |
tf.raw_ops.DepthwiseConv2dNative Computes a 2-D depthwise convolution given 4-D input and filter tensors. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.DepthwiseConv2dNative
tf.raw_ops.DepthwiseConv2dNative(
input, filter, strides, padding, explicit_paddings=[],
data_format='NHWC', dilations=[1, 1, 1, 1], name=None
)
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. for k in 0..in_channels-1
for q in 0..channel_multiplier-1
output[b, i, j, k * channel_multiplier + q] =
sum_{di, dj} input[b, strides[1] * i + di, strides[2] * j + dj, k] *
filter[di, dj, k, q]
Must have strides[0] = strides[3] = 1. For the most common case of the same horizontal and vertices strides, strides = [1, stride, stride, 1].
Args
input A Tensor. Must be one of the following types: half, bfloat16, float32, float64.
filter A Tensor. Must have the same type as input.
strides A list of ints. 1-D of length 4. The stride of the sliding window for each dimension of input.
padding A string from: "SAME", "VALID", "EXPLICIT". The type of padding algorithm to use.
explicit_paddings An optional list of ints. Defaults to [].
data_format An optional string from: "NHWC", "NCHW". Defaults to "NHWC". Specify the data format of the input and output data. With the default format "NHWC", the data is stored in the order of: [batch, height, width, channels]. Alternatively, the format could be "NCHW", the data storage order of: [batch, channels, height, width].
dilations An optional list of ints. Defaults to [1, 1, 1, 1]. 1-D tensor of length 4. The dilation factor for each dimension of input. If set to k > 1, there will be k-1 skipped cells between each filter element on that dimension. The dimension order is determined by the value of data_format, see above for details. Dilations in the batch and depth dimensions must be 1.
name A name for the operation (optional).
Returns A Tensor. Has the same type as input. | tensorflow.raw_ops.depthwiseconv2dnative |
tf.raw_ops.DepthwiseConv2dNativeBackpropFilter Computes the gradients of depthwise convolution with respect to the filter. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.DepthwiseConv2dNativeBackpropFilter
tf.raw_ops.DepthwiseConv2dNativeBackpropFilter(
input, filter_sizes, out_backprop, strides, padding, explicit_paddings=[],
data_format='NHWC', dilations=[1, 1, 1, 1], name=None
)
Args
input A Tensor. Must be one of the following types: half, bfloat16, float32, float64. 4-D with shape based on data_format. For example, if data_format is 'NHWC' then input is a 4-D [batch, in_height, in_width, in_channels] tensor.
filter_sizes A Tensor of type int32. An integer vector representing the tensor shape of filter, where filter is a 4-D [filter_height, filter_width, in_channels, depthwise_multiplier] tensor.
out_backprop A Tensor. Must have the same type as input. 4-D with shape based on data_format. For example, if data_format is 'NHWC' then out_backprop shape is [batch, out_height, out_width, out_channels]. Gradients w.r.t. the output of the convolution.
strides A list of ints. The stride of the sliding window for each dimension of the input of the convolution.
padding A string from: "SAME", "VALID", "EXPLICIT". The type of padding algorithm to use.
explicit_paddings An optional list of ints. Defaults to [].
data_format An optional string from: "NHWC", "NCHW". Defaults to "NHWC". Specify the data format of the input and output data. With the default format "NHWC", the data is stored in the order of: [batch, height, width, channels]. Alternatively, the format could be "NCHW", the data storage order of: [batch, channels, height, width].
dilations An optional list of ints. Defaults to [1, 1, 1, 1]. 1-D tensor of length 4. The dilation factor for each dimension of input. If set to k > 1, there will be k-1 skipped cells between each filter element on that dimension. The dimension order is determined by the value of data_format, see above for details. Dilations in the batch and depth dimensions must be 1.
name A name for the operation (optional).
Returns A Tensor. Has the same type as input. | tensorflow.raw_ops.depthwiseconv2dnativebackpropfilter |
tf.raw_ops.DepthwiseConv2dNativeBackpropInput Computes the gradients of depthwise convolution with respect to the input. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.DepthwiseConv2dNativeBackpropInput
tf.raw_ops.DepthwiseConv2dNativeBackpropInput(
input_sizes, filter, out_backprop, strides, padding, explicit_paddings=[],
data_format='NHWC', dilations=[1, 1, 1, 1], name=None
)
Args
input_sizes A Tensor of type int32. An integer vector representing the shape of input, based on data_format. For example, if data_format is 'NHWC' then input is a 4-D [batch, height, width, channels] tensor.
filter A Tensor. Must be one of the following types: half, bfloat16, float32, float64. 4-D with shape [filter_height, filter_width, in_channels, depthwise_multiplier].
out_backprop A Tensor. Must have the same type as filter. 4-D with shape based on data_format. For example, if data_format is 'NHWC' then out_backprop shape is [batch, out_height, out_width, out_channels]. Gradients w.r.t. the output of the convolution.
strides A list of ints. The stride of the sliding window for each dimension of the input of the convolution.
padding A string from: "SAME", "VALID", "EXPLICIT". The type of padding algorithm to use.
explicit_paddings An optional list of ints. Defaults to [].
data_format An optional string from: "NHWC", "NCHW". Defaults to "NHWC". Specify the data format of the input and output data. With the default format "NHWC", the data is stored in the order of: [batch, height, width, channels]. Alternatively, the format could be "NCHW", the data storage order of: [batch, channels, height, width].
dilations An optional list of ints. Defaults to [1, 1, 1, 1]. 1-D tensor of length 4. The dilation factor for each dimension of input. If set to k > 1, there will be k-1 skipped cells between each filter element on that dimension. The dimension order is determined by the value of data_format, see above for details. Dilations in the batch and depth dimensions must be 1.
name A name for the operation (optional).
Returns A Tensor. Has the same type as filter. | tensorflow.raw_ops.depthwiseconv2dnativebackpropinput |
tf.raw_ops.Dequantize Dequantize the 'input' tensor into a float or bfloat16 Tensor. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.Dequantize
tf.raw_ops.Dequantize(
input, min_range, max_range, mode='MIN_COMBINED', narrow_range=False,
axis=-1, dtype=tf.dtypes.float32, name=None
)
[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: if T == qint8: in[i] += (range(T) + 1)/ 2.0
out[i] = min_range + (in[i]* (max_range - min_range) / range(T))
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: num_discrete_values = 1 << (# of bits in T)
range_adjust = num_discrete_values / (num_discrete_values - 1)
range = (range_max - range_min) * range_adjust
range_scale = range / num_discrete_values
const double offset_input = static_cast<double>(input) - lowest_quantized;
result = range_min + ((input - numeric_limits<T>::min()) * range_scale)
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:
const int min_expected_T = std::numeric_limits<T>::min() +
(narrow_range ? 1 : 0);
const int max_expected_T = std::numeric_limits<T>::max();
const float max_expected_T = std::numeric_limits<float>::max();
const float scale_factor =
(std::numeric_limits<T>::min() == 0) ? (max_range / max_expected_T)
: std::max(min_range / min_expected_T,
max_range / max_expected_T);
Args
input A Tensor. Must be one of the following types: qint8, quint8, qint32, qint16, quint16.
min_range A Tensor of type float32. The minimum scalar value possibly produced for the input.
max_range A Tensor of type float32. The maximum scalar value possibly produced for the input.
mode An optional string from: "MIN_COMBINED", "MIN_FIRST", "SCALED". Defaults to "MIN_COMBINED".
narrow_range An optional bool. Defaults to False.
axis An optional int. Defaults to -1.
dtype An optional tf.DType from: tf.bfloat16, tf.float32. Defaults to tf.float32. Type of the output tensor. Currently Dequantize supports float and bfloat16. If 'dtype' is 'bfloat16', it only supports 'MIN_COMBINED' mode.
name A name for the operation (optional).
Returns A Tensor of type dtype. | tensorflow.raw_ops.dequantize |
tf.raw_ops.DeserializeIterator Converts the given variant tensor to an iterator and stores it in the given resource. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.DeserializeIterator
tf.raw_ops.DeserializeIterator(
resource_handle, serialized, name=None
)
Args
resource_handle A Tensor of type resource. A handle to an iterator resource.
serialized A Tensor of type variant. A variant tensor storing the state of the iterator contained in the resource.
name A name for the operation (optional).
Returns The created Operation. | tensorflow.raw_ops.deserializeiterator |
tf.raw_ops.DeserializeManySparse Deserialize and concatenate SparseTensors from a serialized minibatch. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.DeserializeManySparse
tf.raw_ops.DeserializeManySparse(
serialized_sparse, dtype, name=None
)
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: index = [ 0]
[10]
[20]
values = [1, 2, 3]
shape = [50]
and index = [ 2]
[10]
values = [4, 5]
shape = [30]
then the final deserialized SparseTensor will be: index = [0 0]
[0 10]
[0 20]
[1 2]
[1 10]
values = [1, 2, 3, 4, 5]
shape = [2 50]
Args
serialized_sparse A Tensor of type string. 2-D, The N serialized SparseTensor objects. Must have 3 columns.
dtype A tf.DType. The dtype of the serialized SparseTensor objects.
name A name for the operation (optional).
Returns A tuple of Tensor objects (sparse_indices, sparse_values, sparse_shape). sparse_indices A Tensor of type int64.
sparse_values A Tensor of type dtype.
sparse_shape A Tensor of type int64. | tensorflow.raw_ops.deserializemanysparse |
tf.raw_ops.DeserializeSparse Deserialize SparseTensor objects. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.DeserializeSparse
tf.raw_ops.DeserializeSparse(
serialized_sparse, dtype, name=None
)
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: index = [ 0]
[10]
[20]
values = [1, 2, 3]
shape = [50]
and index = [ 2]
[10]
values = [4, 5]
shape = [30]
then the final deserialized SparseTensor will be: index = [0 0]
[0 10]
[0 20]
[1 2]
[1 10]
values = [1, 2, 3, 4, 5]
shape = [2 50]
Args
serialized_sparse A Tensor. Must be one of the following types: string, variant. The serialized SparseTensor objects. The last dimension must have 3 columns.
dtype A tf.DType. The dtype of the serialized SparseTensor objects.
name A name for the operation (optional).
Returns A tuple of Tensor objects (sparse_indices, sparse_values, sparse_shape). sparse_indices A Tensor of type int64.
sparse_values A Tensor of type dtype.
sparse_shape A Tensor of type int64. | tensorflow.raw_ops.deserializesparse |
tf.raw_ops.DestroyResourceOp Deletes the resource specified by the handle. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.DestroyResourceOp
tf.raw_ops.DestroyResourceOp(
resource, ignore_lookup_error=True, name=None
)
All subsequent operations using the resource will result in a NotFound error status.
Args
resource A Tensor of type resource. handle to the resource to delete.
ignore_lookup_error An optional bool. Defaults to True. whether to ignore the error when the resource doesn't exist.
name A name for the operation (optional).
Returns The created Operation. | tensorflow.raw_ops.destroyresourceop |
tf.raw_ops.DestroyTemporaryVariable Destroys the temporary variable and returns its final value. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.DestroyTemporaryVariable
tf.raw_ops.DestroyTemporaryVariable(
ref, var_name, name=None
)
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'.
Args
ref A mutable Tensor. A reference to the temporary variable tensor.
var_name A string. Name of the temporary variable, usually the name of the matching 'TemporaryVariable' op.
name A name for the operation (optional).
Returns A Tensor. Has the same type as ref. | tensorflow.raw_ops.destroytemporaryvariable |
tf.raw_ops.DeviceIndex Return the index of device the op runs. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.DeviceIndex
tf.raw_ops.DeviceIndex(
device_names, name=None
)
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.
Args
device_names A list of strings.
name A name for the operation (optional).
Returns A Tensor of type int32. | tensorflow.raw_ops.deviceindex |
tf.raw_ops.Diag Returns a diagonal tensor with a given diagonal values. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.Diag
tf.raw_ops.Diag(
diagonal, name=None
)
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. For example: # 'diagonal' is [1, 2, 3, 4]
tf.diag(diagonal) ==> [[1, 0, 0, 0]
[0, 2, 0, 0]
[0, 0, 3, 0]
[0, 0, 0, 4]]
Args
diagonal A Tensor. Must be one of the following types: bfloat16, half, float32, float64, int32, int64, complex64, complex128. Rank k tensor where k is at most 1.
name A name for the operation (optional).
Returns A Tensor. Has the same type as diagonal. | tensorflow.raw_ops.diag |
tf.raw_ops.DiagPart Returns the diagonal part of the tensor. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.DiagPart
tf.raw_ops.DiagPart(
input, name=None
)
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]. For example: # 'input' is [[1, 0, 0, 0]
[0, 2, 0, 0]
[0, 0, 3, 0]
[0, 0, 0, 4]]
tf.diag_part(input) ==> [1, 2, 3, 4]
Args
input A Tensor. Must be one of the following types: bfloat16, half, float32, float64, int32, int64, complex64, complex128. Rank k tensor where k is even and not zero.
name A name for the operation (optional).
Returns A Tensor. Has the same type as input. | tensorflow.raw_ops.diagpart |
tf.raw_ops.Digamma Computes Psi, the derivative of Lgamma (the log of the absolute value of View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.Digamma
tf.raw_ops.Digamma(
x, name=None
)
Gamma(x)), element-wise.
Args
x A Tensor. Must be one of the following types: bfloat16, half, float32, float64.
name A name for the operation (optional).
Returns A Tensor. Has the same type as x. | tensorflow.raw_ops.digamma |
tf.raw_ops.Dilation2D Computes the grayscale dilation of 4-D input and 3-D filter tensors. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.Dilation2D
tf.raw_ops.Dilation2D(
input, filter, strides, rates, padding, name=None
)
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): output[b, y, x, c] =
max_{dy, dx} input[b,
strides[1] * y + rates[1] * dy,
strides[2] * x + rates[2] * dx,
c] +
filter[dy, dx, c]
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.
Args
input A Tensor. Must be one of the following types: float32, float64, int32, uint8, int16, int8, int64, bfloat16, uint16, half, uint32, uint64. 4-D with shape [batch, in_height, in_width, depth].
filter A Tensor. Must have the same type as input. 3-D with shape [filter_height, filter_width, depth].
strides A list of ints that has length >= 4. The stride of the sliding window for each dimension of the input tensor. Must be: [1, stride_height, stride_width, 1].
rates A list of ints that has length >= 4. The input stride for atrous morphological dilation. Must be: [1, rate_height, rate_width, 1].
padding A string from: "SAME", "VALID". The type of padding algorithm to use.
name A name for the operation (optional).
Returns A Tensor. Has the same type as input. | tensorflow.raw_ops.dilation2d |
tf.raw_ops.Dilation2DBackpropFilter Computes the gradient of morphological 2-D dilation with respect to the filter. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.Dilation2DBackpropFilter
tf.raw_ops.Dilation2DBackpropFilter(
input, filter, out_backprop, strides, rates, padding, name=None
)
Args
input A Tensor. Must be one of the following types: float32, float64, int32, uint8, int16, int8, int64, bfloat16, uint16, half, uint32, uint64. 4-D with shape [batch, in_height, in_width, depth].
filter A Tensor. Must have the same type as input. 3-D with shape [filter_height, filter_width, depth].
out_backprop A Tensor. Must have the same type as input. 4-D with shape [batch, out_height, out_width, depth].
strides A list of ints that has length >= 4. 1-D of length 4. The stride of the sliding window for each dimension of the input tensor. Must be: [1, stride_height, stride_width, 1].
rates A list of ints that has length >= 4. 1-D of length 4. The input stride for atrous morphological dilation. Must be: [1, rate_height, rate_width, 1].
padding A string from: "SAME", "VALID". The type of padding algorithm to use.
name A name for the operation (optional).
Returns A Tensor. Has the same type as input. | tensorflow.raw_ops.dilation2dbackpropfilter |
tf.raw_ops.Dilation2DBackpropInput Computes the gradient of morphological 2-D dilation with respect to the input. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.Dilation2DBackpropInput
tf.raw_ops.Dilation2DBackpropInput(
input, filter, out_backprop, strides, rates, padding, name=None
)
Args
input A Tensor. Must be one of the following types: float32, float64, int32, uint8, int16, int8, int64, bfloat16, uint16, half, uint32, uint64. 4-D with shape [batch, in_height, in_width, depth].
filter A Tensor. Must have the same type as input. 3-D with shape [filter_height, filter_width, depth].
out_backprop A Tensor. Must have the same type as input. 4-D with shape [batch, out_height, out_width, depth].
strides A list of ints that has length >= 4. 1-D of length 4. The stride of the sliding window for each dimension of the input tensor. Must be: [1, stride_height, stride_width, 1].
rates A list of ints that has length >= 4. 1-D of length 4. The input stride for atrous morphological dilation. Must be: [1, rate_height, rate_width, 1].
padding A string from: "SAME", "VALID". The type of padding algorithm to use.
name A name for the operation (optional).
Returns A Tensor. Has the same type as input. | tensorflow.raw_ops.dilation2dbackpropinput |
tf.raw_ops.DirectedInterleaveDataset A substitute for InterleaveDataset on a fixed list of N datasets. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.DirectedInterleaveDataset
tf.raw_ops.DirectedInterleaveDataset(
selector_input_dataset, data_input_datasets, output_types, output_shapes,
name=None
)
Args
selector_input_dataset A Tensor of type variant. A dataset of scalar DT_INT64 elements that determines which of the N data inputs should produce the next output element.
data_input_datasets A list of at least 1 Tensor objects with type variant. N datasets with the same type that will be interleaved according to the values of selector_input_dataset.
output_types A list of tf.DTypes that has length >= 1.
output_shapes A list of shapes (each a tf.TensorShape or list of ints) that has length >= 1.
name A name for the operation (optional).
Returns A Tensor of type variant. | tensorflow.raw_ops.directedinterleavedataset |
tf.raw_ops.Div Returns x / y element-wise. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.Div
tf.raw_ops.Div(
x, y, name=None
)
Note: Div supports broadcasting. More about broadcasting here
Args
x A Tensor. Must be one of the following types: bfloat16, half, float32, float64, uint8, int8, uint16, int16, int32, int64, complex64, complex128.
y A Tensor. Must have the same type as x.
name A name for the operation (optional).
Returns A Tensor. Has the same type as x. | tensorflow.raw_ops.div |
tf.raw_ops.DivNoNan Returns 0 if the denominator is zero. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.DivNoNan
tf.raw_ops.DivNoNan(
x, y, name=None
)
Note: DivNoNan supports broadcasting. More about broadcasting here
Args
x A Tensor. Must be one of the following types: half, float32, float64, complex64, complex128.
y A Tensor. Must have the same type as x.
name A name for the operation (optional).
Returns A Tensor. Has the same type as x. | tensorflow.raw_ops.divnonan |
tf.raw_ops.DrawBoundingBoxes Draw bounding boxes on a batch of images. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.DrawBoundingBoxes
tf.raw_ops.DrawBoundingBoxes(
images, boxes, name=None
)
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.
Args
images A Tensor. Must be one of the following types: float32, half. 4-D with shape [batch, height, width, depth]. A batch of images.
boxes A Tensor of type float32. 3-D with shape [batch, num_bounding_boxes, 4] containing bounding boxes.
name A name for the operation (optional).
Returns A Tensor. Has the same type as images. | tensorflow.raw_ops.drawboundingboxes |
tf.raw_ops.DrawBoundingBoxesV2 Draw bounding boxes on a batch of images. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.DrawBoundingBoxesV2
tf.raw_ops.DrawBoundingBoxesV2(
images, boxes, colors, name=None
)
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.
Args
images A Tensor. Must be one of the following types: float32, half. 4-D with shape [batch, height, width, depth]. A batch of images.
boxes A Tensor of type float32. 3-D with shape [batch, num_bounding_boxes, 4] containing bounding boxes.
colors A Tensor of type float32. 2-D. A list of RGBA colors to cycle through for the boxes.
name A name for the operation (optional).
Returns A Tensor. Has the same type as images. | tensorflow.raw_ops.drawboundingboxesv2 |
tf.raw_ops.DummyIterationCounter View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.DummyIterationCounter
tf.raw_ops.DummyIterationCounter(
name=None
)
Args
name A name for the operation (optional).
Returns A Tensor of type resource. | tensorflow.raw_ops.dummyiterationcounter |
tf.raw_ops.DummyMemoryCache View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.DummyMemoryCache
tf.raw_ops.DummyMemoryCache(
name=None
)
Args
name A name for the operation (optional).
Returns A Tensor of type resource. | tensorflow.raw_ops.dummymemorycache |
tf.raw_ops.DummySeedGenerator View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.DummySeedGenerator
tf.raw_ops.DummySeedGenerator(
name=None
)
Args
name A name for the operation (optional).
Returns A Tensor of type resource. | tensorflow.raw_ops.dummyseedgenerator |
tf.raw_ops.DynamicPartition Partitions data into num_partitions tensors using indices from partitions. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.DynamicPartition
tf.raw_ops.DynamicPartition(
data, partitions, num_partitions, name=None
)
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, outputs[i].shape = [sum(partitions == i)] + data.shape[partitions.ndim:]
outputs[i] = pack([data[js, ...] for js if partitions[js] == i])
data.shape must start with partitions.shape. For example: # Scalar partitions.
partitions = 1
num_partitions = 2
data = [10, 20]
outputs[0] = [] # Empty with shape [0, 2]
outputs[1] = [[10, 20]]
# Vector partitions.
partitions = [0, 0, 1, 1, 0]
num_partitions = 2
data = [10, 20, 30, 40, 50]
outputs[0] = [10, 20, 50]
outputs[1] = [30, 40]
See dynamic_stitch for an example on how to merge partitions back.
Args
data A Tensor.
partitions A Tensor of type int32. Any shape. Indices in the range [0, num_partitions).
num_partitions An int that is >= 1. The number of partitions to output.
name A name for the operation (optional).
Returns A list of num_partitions Tensor objects with the same type as data. | tensorflow.raw_ops.dynamicpartition |
tf.raw_ops.DynamicStitch Interleave the values from the data tensors into a single tensor. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.DynamicStitch
tf.raw_ops.DynamicStitch(
indices, data, name=None
)
Builds a merged tensor such that merged[indices[m][i, ..., j], ...] = data[m][i, ..., j, ...]
For example, if each indices[m] is scalar or vector, we have # Scalar indices:
merged[indices[m], ...] = data[m][...]
# Vector indices:
merged[indices[m][i], ...] = data[m][i, ...]
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 merged.shape = [max(indices)] + constant
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. For example: indices[0] = 6
indices[1] = [4, 1]
indices[2] = [[5, 2], [0, 3]]
data[0] = [61, 62]
data[1] = [[41, 42], [11, 12]]
data[2] = [[[51, 52], [21, 22]], [[1, 2], [31, 32]]]
merged = [[1, 2], [11, 12], [21, 22], [31, 32], [41, 42],
[51, 52], [61, 62]]
This method can be used to merge partitions created by dynamic_partition as illustrated on the following example: # Apply function (increments x_i) on elements for which a certain condition
# apply (x_i != -1 in this example).
x=tf.constant([0.1, -1., 5.2, 4.3, -1., 7.4])
condition_mask=tf.not_equal(x,tf.constant(-1.))
partitioned_data = tf.dynamic_partition(
x, tf.cast(condition_mask, tf.int32) , 2)
partitioned_data[1] = partitioned_data[1] + 1.0
condition_indices = tf.dynamic_partition(
tf.range(tf.shape(x)[0]), tf.cast(condition_mask, tf.int32) , 2)
x = tf.dynamic_stitch(condition_indices, partitioned_data)
# Here x=[1.1, -1., 6.2, 5.3, -1, 8.4], the -1. values remain
# unchanged.
Args
indices A list of at least 1 Tensor objects with type int32.
data A list with the same length as indices of Tensor objects with the same type.
name A name for the operation (optional).
Returns A Tensor. Has the same type as data. | tensorflow.raw_ops.dynamicstitch |
tf.raw_ops.EagerPyFunc Eagerly executes a python function to compute func(input)->output. The View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.EagerPyFunc
tf.raw_ops.EagerPyFunc(
input, token, Tout, is_async=False, name=None
)
semantics of the input, output, and attributes are the same as those for PyFunc.
Args
input A list of Tensor objects.
token A string.
Tout A list of tf.DTypes.
is_async An optional bool. Defaults to False.
name A name for the operation (optional).
Returns A list of Tensor objects of type Tout. | tensorflow.raw_ops.eagerpyfunc |
tf.raw_ops.EditDistance Computes the (possibly normalized) Levenshtein Edit Distance. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.EditDistance
tf.raw_ops.EditDistance(
hypothesis_indices, hypothesis_values, hypothesis_shape, truth_indices,
truth_values, truth_shape, normalize=True, name=None
)
The inputs are variable-length sequences provided by SparseTensors (hypothesis_indices, hypothesis_values, hypothesis_shape) and (truth_indices, truth_values, truth_shape). The inputs are:
Args
hypothesis_indices A Tensor of type int64. The indices of the hypothesis list SparseTensor. This is an N x R int64 matrix.
hypothesis_values A Tensor. The values of the hypothesis list SparseTensor. This is an N-length vector.
hypothesis_shape A Tensor of type int64. The shape of the hypothesis list SparseTensor. This is an R-length vector.
truth_indices A Tensor of type int64. The indices of the truth list SparseTensor. This is an M x R int64 matrix.
truth_values A Tensor. Must have the same type as hypothesis_values. The values of the truth list SparseTensor. This is an M-length vector.
truth_shape A Tensor of type int64. truth indices, vector.
normalize An optional bool. Defaults to True. boolean (if true, edit distances are normalized by length of truth). The output is:
name A name for the operation (optional).
Returns A Tensor of type float32. | tensorflow.raw_ops.editdistance |
tf.raw_ops.Eig Computes the eigen decomposition of one or more square matrices. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.Eig
tf.raw_ops.Eig(
input, Tout, compute_v=True, name=None
)
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. # a is a tensor.
# e is a tensor of eigenvalues.
# v is a tensor of eigenvectors.
e, v = eig(a)
e = eig(a, compute_v=False)
Args
input A Tensor. Must be one of the following types: float32, float64, complex64, complex128. Tensor input of shape [N, N].
Tout A tf.DType from: tf.complex64, tf.complex128.
compute_v An optional bool. Defaults to True. If True then eigenvectors will be computed and returned in v. Otherwise, only the eigenvalues will be computed.
name A name for the operation (optional).
Returns A tuple of Tensor objects (e, v). e A Tensor of type Tout.
v A Tensor of type Tout. | tensorflow.raw_ops.eig |
tf.raw_ops.Einsum Tensor contraction according to Einstein summation convention. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.Einsum
tf.raw_ops.Einsum(
inputs, equation, name=None
)
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.
Note: This Op is not intended to be called by the user; instead users should call tf.einsum directly. It is a hidden Op used by tf.einsum.
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.
Args
inputs A list of at least 1 Tensor objects with the same type. List of 1 or 2 Tensors.
equation A string. String describing the Einstein Summation operation; in the format of np.einsum.
name A name for the operation (optional).
Returns A Tensor. Has the same type as inputs.
Numpy Compatibility Similar to numpy.einsum. Comparison with numpy.einsum: This Op only supports unary and binary forms of numpy.einsum. This Op does not support implicit form. (i.e. equations without ->). This Op also supports repeated indices in the output subscript, which is not supported by numpy.einsum. | tensorflow.raw_ops.einsum |
tf.raw_ops.Elu Computes exponential linear: exp(features) - 1 if < 0, features otherwise. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.Elu
tf.raw_ops.Elu(
features, name=None
)
See Fast and Accurate Deep Network Learning by Exponential Linear Units (ELUs)
Args
features A Tensor. Must be one of the following types: half, bfloat16, float32, float64.
name A name for the operation (optional).
Returns A Tensor. Has the same type as features. | tensorflow.raw_ops.elu |
tf.raw_ops.EluGrad Computes gradients for the exponential linear (Elu) operation. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.EluGrad
tf.raw_ops.EluGrad(
gradients, outputs, name=None
)
Args
gradients A Tensor. Must be one of the following types: half, bfloat16, float32, float64. The backpropagated gradients to the corresponding Elu operation.
outputs A Tensor. Must have the same type as gradients. The outputs of the corresponding Elu operation.
name A name for the operation (optional).
Returns A Tensor. Has the same type as gradients. | tensorflow.raw_ops.elugrad |
tf.raw_ops.Empty Creates a tensor with the given shape. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.Empty
tf.raw_ops.Empty(
shape, dtype, init=False, name=None
)
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. | tensorflow.raw_ops.empty |
tf.raw_ops.EmptyTensorList Creates and returns an empty tensor list. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.EmptyTensorList
tf.raw_ops.EmptyTensorList(
element_shape, max_num_elements, element_dtype, name=None
)
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.
Args
element_shape A Tensor. Must be one of the following types: int32, int64.
max_num_elements A Tensor of type int32.
element_dtype A tf.DType.
name A name for the operation (optional).
Returns A Tensor of type variant. | tensorflow.raw_ops.emptytensorlist |
tf.raw_ops.EncodeBase64 Encode strings into web-safe base64 format. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.EncodeBase64
tf.raw_ops.EncodeBase64(
input, pad=False, name=None
)
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 /.
Args
input A Tensor of type string. Strings to be encoded.
pad An optional bool. Defaults to False. Bool whether padding is applied at the ends.
name A name for the operation (optional).
Returns A Tensor of type string. | tensorflow.raw_ops.encodebase64 |
tf.raw_ops.EncodeJpeg JPEG-encode an image. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.EncodeJpeg
tf.raw_ops.EncodeJpeg(
image, format='', quality=95, progressive=False, optimize_size=False,
chroma_downsampling=True, density_unit='in', x_density=300,
y_density=300, xmp_metadata='', name=None
)
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:
'': Use a default format based on the number of channels in the image.
grayscale: Output a grayscale JPEG image. The channels dimension of image must be 1.
rgb: Output an RGB JPEG image. The channels dimension of image must be 3. If format is not specified or is the empty string, a default format is picked in function of the number of channels in image: 1: Output a grayscale image. 3: Output an RGB image.
Args
image A Tensor of type uint8. 3-D with shape [height, width, channels].
format An optional string from: "", "grayscale", "rgb". Defaults to "". Per pixel image format.
quality An optional int. Defaults to 95. Quality of the compression from 0 to 100 (higher is better and slower).
progressive An optional bool. Defaults to False. If True, create a JPEG that loads progressively (coarse to fine).
optimize_size An optional bool. Defaults to False. If True, spend CPU/RAM to reduce size with no quality change.
chroma_downsampling An optional bool. Defaults to True. See http://en.wikipedia.org/wiki/Chroma_subsampling
density_unit An optional string from: "in", "cm". Defaults to "in". Unit used to specify x_density and y_density: pixels per inch ('in') or centimeter ('cm').
x_density An optional int. Defaults to 300. Horizontal pixels per density unit.
y_density An optional int. Defaults to 300. Vertical pixels per density unit.
xmp_metadata An optional string. Defaults to "". If not empty, embed this XMP metadata in the image header.
name A name for the operation (optional).
Returns A Tensor of type string. | tensorflow.raw_ops.encodejpeg |
tf.raw_ops.EncodeJpegVariableQuality JPEG encode input image with provided compression quality. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.EncodeJpegVariableQuality
tf.raw_ops.EncodeJpegVariableQuality(
images, quality, name=None
)
image is a 3-D uint8 Tensor of shape [height, width, channels]. quality is an int32 jpeg compression quality value between 0 and 100.
Args
images A Tensor of type uint8. Images to adjust. At least 3-D.
quality A Tensor of type int32. An int quality to encode to.
name A name for the operation (optional).
Returns A Tensor of type string. | tensorflow.raw_ops.encodejpegvariablequality |
tf.raw_ops.EncodePng PNG-encode an image. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.EncodePng
tf.raw_ops.EncodePng(
image, compression=-1, name=None
)
image is a 3-D uint8 or uint16 Tensor of shape [height, width, channels] where channels is: 1: for grayscale. 2: for grayscale + alpha. 3: for RGB. 4: for RGBA. 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.
Args
image A Tensor. Must be one of the following types: uint8, uint16. 3-D with shape [height, width, channels].
compression An optional int. Defaults to -1. Compression level.
name A name for the operation (optional).
Returns A Tensor of type string. | tensorflow.raw_ops.encodepng |
tf.raw_ops.EncodeProto The op serializes protobuf messages provided in the input tensors. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.EncodeProto
tf.raw_ops.EncodeProto(
sizes, values, field_names, message_type,
descriptor_source='local://', name=None
)
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.
Args
sizes A Tensor of type int32. Tensor of int32 with shape [batch_shape, len(field_names)].
values A list of Tensor objects. List of tensors containing values for the corresponding field.
field_names A list of strings. List of strings containing proto field names.
message_type A string. Name of the proto message type to decode.
descriptor_source An optional string. Defaults to "local://".
name A name for the operation (optional).
Returns A Tensor of type string. | tensorflow.raw_ops.encodeproto |
tf.raw_ops.EncodeWav Encode audio data using the WAV file format. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.EncodeWav
tf.raw_ops.EncodeWav(
audio, sample_rate, name=None
)
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).
Args
audio A Tensor of type float32. 2-D with shape [length, channels].
sample_rate A Tensor of type int32. Scalar containing the sample frequency.
name A name for the operation (optional).
Returns A Tensor of type string. | tensorflow.raw_ops.encodewav |
tf.raw_ops.EnqueueTPUEmbeddingIntegerBatch An op that enqueues a list of input batch tensors to TPUEmbedding. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.EnqueueTPUEmbeddingIntegerBatch
tf.raw_ops.EnqueueTPUEmbeddingIntegerBatch(
batch, mode_override, device_ordinal=-1, name=None
)
Args
batch A list of at least 1 Tensor objects with type int32. A list of 1D tensors, one for each embedding table, containing the indices into the tables.
mode_override A Tensor of type string. A string input that overrides the mode specified in the TPUEmbeddingConfiguration. Supported values are {'unspecified', 'inference', 'training', 'backward_pass_only'}. When set to 'unspecified', the mode set in TPUEmbeddingConfiguration is used, otherwise mode_override is used.
device_ordinal An optional int. Defaults to -1. The TPU device to use. Should be >= 0 and less than the number of TPU cores in the task on which the node is placed.
name A name for the operation (optional).
Returns The created Operation. | tensorflow.raw_ops.enqueuetpuembeddingintegerbatch |
tf.raw_ops.EnqueueTPUEmbeddingRaggedTensorBatch Eases the porting of code that uses tf.nn.embedding_lookup(). View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.EnqueueTPUEmbeddingRaggedTensorBatch
tf.raw_ops.EnqueueTPUEmbeddingRaggedTensorBatch(
sample_splits, embedding_indices, aggregation_weights, mode_override, table_ids,
device_ordinal=-1, combiners=[], max_sequence_lengths=[], name=None
)
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.
Args
sample_splits A list of at least 1 Tensor objects with the same type in: int32, int64. A list of rank 1 Tensors specifying the break points for splitting embedding_indices and aggregation_weights into rows. It corresponds to ids.row_splits in embedding_lookup(), when ids is a RaggedTensor.
embedding_indices A list with the same length as sample_splits of Tensor objects with the same type in: int32, int64. A list of rank 1 Tensors, indices into the embedding tables. It corresponds to ids.values in embedding_lookup(), when ids is a RaggedTensor.
aggregation_weights A list with the same length as sample_splits of Tensor objects with the same type in: float32, float64. A list of rank 1 Tensors containing per training example aggregation weights. It corresponds to the values field of a RaggedTensor with the same row_splits as ids in embedding_lookup(), when ids is a RaggedTensor.
mode_override A Tensor of type string. A string input that overrides the mode specified in the TPUEmbeddingConfiguration. Supported values are {'unspecified', 'inference', 'training', 'backward_pass_only'}. When set to 'unspecified', the mode set in TPUEmbeddingConfiguration is used, otherwise mode_override is used.
table_ids A list of ints. A list of integers specifying the identifier of the embedding table (offset of TableDescriptor in the TPUEmbeddingConfiguration) to lookup the corresponding input. The ith input is looked up using table_ids[i]. The size of the table_ids list must be equal to that of sample_indices, embedding_indices and aggregation_weights.
device_ordinal An optional int. Defaults to -1. The TPU device to use. Should be >= 0 and less than the number of TPU cores in the task on which the node is placed.
combiners An optional list of strings. Defaults to []. A list of string scalars, one for each embedding table that specify how to normalize the embedding activations after weighted summation. Supported combiners are 'mean', 'sum', or 'sqrtn'. It is invalid to have the sum of the weights be 0 for 'mean' or the sum of the squared weights be 0 for 'sqrtn'. If combiners isn't passed, the default is to use 'sum' for all tables.
max_sequence_lengths An optional list of ints. Defaults to [].
name A name for the operation (optional).
Returns The created Operation. | tensorflow.raw_ops.enqueuetpuembeddingraggedtensorbatch |
tf.raw_ops.EnqueueTPUEmbeddingSparseBatch An op that enqueues TPUEmbedding input indices from a SparseTensor. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.EnqueueTPUEmbeddingSparseBatch
tf.raw_ops.EnqueueTPUEmbeddingSparseBatch(
sample_indices, embedding_indices, aggregation_weights, mode_override,
device_ordinal=-1, combiners=[], name=None
)
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.
Args
sample_indices A list of at least 1 Tensor objects with the same type in: int32, int64. A list of rank 1 Tensors specifying the training example and feature to which the corresponding embedding_indices and aggregation_weights values belong. sample_indices[i] must equal b * nf + f, where nf is the number of features from the corresponding table, f is in [0, nf), and b is in [0, batch size).
embedding_indices A list with the same length as sample_indices of Tensor objects with the same type in: int32, int64. A list of rank 1 Tensors, indices into the embedding tables.
aggregation_weights A list with the same length as sample_indices of Tensor objects with the same type in: float32, float64. A list of rank 1 Tensors containing per sample -- i.e. per (training example, feature) -- aggregation weights.
mode_override A Tensor of type string. A string input that overrides the mode specified in the TPUEmbeddingConfiguration. Supported values are {'unspecified', 'inference', 'training', 'backward_pass_only'}. When set to 'unspecified', the mode set in TPUEmbeddingConfiguration is used, otherwise mode_override is used.
device_ordinal An optional int. Defaults to -1. The TPU device to use. Should be >= 0 and less than the number of TPU cores in the task on which the node is placed.
combiners An optional list of strings. Defaults to []. A list of string scalars, one for each embedding table that specify how to normalize the embedding activations after weighted summation. Supported combiners are 'mean', 'sum', or 'sqrtn'. It is invalid to have the sum of the weights be 0 for 'mean' or the sum of the squared weights be 0 for 'sqrtn'. If combiners isn't passed, the default is to use 'sum' for all tables.
name A name for the operation (optional).
Returns The created Operation. | tensorflow.raw_ops.enqueuetpuembeddingsparsebatch |
tf.raw_ops.EnqueueTPUEmbeddingSparseTensorBatch Eases the porting of code that uses tf.nn.embedding_lookup_sparse(). View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.EnqueueTPUEmbeddingSparseTensorBatch
tf.raw_ops.EnqueueTPUEmbeddingSparseTensorBatch(
sample_indices, embedding_indices, aggregation_weights, mode_override,
table_ids, device_ordinal=-1, combiners=[], max_sequence_lengths=[], name=None
)
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.
Args
sample_indices A list of at least 1 Tensor objects with the same type in: int32, int64. A list of rank 1 Tensors specifying the training example to which the corresponding embedding_indices and aggregation_weights values belong. It corresponds to sp_ids.indices[:,0] in embedding_lookup_sparse().
embedding_indices A list with the same length as sample_indices of Tensor objects with the same type in: int32, int64. A list of rank 1 Tensors, indices into the embedding tables. It corresponds to sp_ids.values in embedding_lookup_sparse().
aggregation_weights A list with the same length as sample_indices of Tensor objects with the same type in: float32, float64. A list of rank 1 Tensors containing per training example aggregation weights. It corresponds to sp_weights.values in embedding_lookup_sparse().
mode_override A Tensor of type string. A string input that overrides the mode specified in the TPUEmbeddingConfiguration. Supported values are {'unspecified', 'inference', 'training', 'backward_pass_only'}. When set to 'unspecified', the mode set in TPUEmbeddingConfiguration is used, otherwise mode_override is used.
table_ids A list of ints. A list of integers specifying the identifier of the embedding table (offset of TableDescriptor in the TPUEmbeddingConfiguration) to lookup the corresponding input. The ith input is looked up using table_ids[i]. The size of the table_ids list must be equal to that of sample_indices, embedding_indices and aggregation_weights.
device_ordinal An optional int. Defaults to -1. The TPU device to use. Should be >= 0 and less than the number of TPU cores in the task on which the node is placed.
combiners An optional list of strings. Defaults to []. A list of string scalars, one for each embedding table that specify how to normalize the embedding activations after weighted summation. Supported combiners are 'mean', 'sum', or 'sqrtn'. It is invalid to have the sum of the weights be 0 for 'mean' or the sum of the squared weights be 0 for 'sqrtn'. If combiners isn't passed, the default is to use 'sum' for all tables.
max_sequence_lengths An optional list of ints. Defaults to [].
name A name for the operation (optional).
Returns The created Operation. | tensorflow.raw_ops.enqueuetpuembeddingsparsetensorbatch |
tf.raw_ops.EnsureShape Ensures that the tensor's shape matches the expected shape. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.EnsureShape
tf.raw_ops.EnsureShape(
input, shape, name=None
)
Raises an error if the input tensor's shape does not match the specified shape. Returns the input tensor otherwise.
Args
input A Tensor. A tensor, whose shape is to be validated.
shape A tf.TensorShape or list of ints. The expected (possibly partially specified) shape of the input tensor.
name A name for the operation (optional).
Returns A Tensor. Has the same type as input. | tensorflow.raw_ops.ensureshape |
tf.raw_ops.Enter Creates or finds a child frame, and makes data available to the child frame. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.Enter
tf.raw_ops.Enter(
data, frame_name, is_constant=False, parallel_iterations=10, name=None
)
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.
Args
data A Tensor. The tensor to be made available to the child frame.
frame_name A string. The name of the child frame.
is_constant An optional bool. Defaults to False. If true, the output is constant within the child frame.
parallel_iterations An optional int. Defaults to 10. The number of iterations allowed to run in parallel.
name A name for the operation (optional).
Returns A Tensor. Has the same type as data. | tensorflow.raw_ops.enter |
tf.raw_ops.Equal Returns the truth value of (x == y) element-wise. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.Equal
tf.raw_ops.Equal(
x, y, incompatible_shape_error=True, name=None
)
Note: Equal supports broadcasting. More about broadcasting here
x = tf.constant([2, 4])
y = tf.constant(2)
tf.math.equal(x, y) ==> array([True, False])
x = tf.constant([2, 4])
y = tf.constant([2, 4])
tf.math.equal(x, y) ==> array([True, True])
Args
x A Tensor.
y A Tensor. Must have the same type as x.
incompatible_shape_error An optional bool. Defaults to True.
name A name for the operation (optional).
Returns A Tensor of type bool. | tensorflow.raw_ops.equal |
tf.raw_ops.Erf Computes the Gauss error function of x element-wise. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.Erf
tf.raw_ops.Erf(
x, name=None
)
Args
x A Tensor. Must be one of the following types: bfloat16, half, float32, float64.
name A name for the operation (optional).
Returns A Tensor. Has the same type as x. | tensorflow.raw_ops.erf |
tf.raw_ops.Erfc Computes the complementary error function of x element-wise. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.Erfc
tf.raw_ops.Erfc(
x, name=None
)
Args
x A Tensor. Must be one of the following types: bfloat16, half, float32, float64.
name A name for the operation (optional).
Returns A Tensor. Has the same type as x. | tensorflow.raw_ops.erfc |
tf.raw_ops.Erfinv View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.Erfinv
tf.raw_ops.Erfinv(
x, name=None
)
Args
x A Tensor. Must be one of the following types: bfloat16, half, float32, float64.
name A name for the operation (optional).
Returns A Tensor. Has the same type as x. | tensorflow.raw_ops.erfinv |
tf.raw_ops.EuclideanNorm Computes the euclidean norm of elements across dimensions of a tensor. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.EuclideanNorm
tf.raw_ops.EuclideanNorm(
input, axis, keep_dims=False, name=None
)
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.
Args
input A Tensor. Must be one of the following types: float32, float64, int32, uint8, int16, int8, complex64, int64, qint8, quint8, qint32, bfloat16, uint16, complex128, half, uint32, uint64. The tensor to reduce.
axis A Tensor. Must be one of the following types: int32, int64. The dimensions to reduce. Must be in the range [-rank(input), rank(input)).
keep_dims An optional bool. Defaults to False. If true, retain reduced dimensions with length 1.
name A name for the operation (optional).
Returns A Tensor. Has the same type as input. | tensorflow.raw_ops.euclideannorm |
tf.raw_ops.Exit Exits the current frame to its parent frame. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.Exit
tf.raw_ops.Exit(
data, name=None
)
Exit makes its input data available to the parent frame.
Args
data A Tensor. The tensor to be made available to the parent frame.
name A name for the operation (optional).
Returns A Tensor. Has the same type as data. | tensorflow.raw_ops.exit |
tf.raw_ops.Exp Computes exponential of x element-wise. \(y = e^x\). View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.Exp
tf.raw_ops.Exp(
x, name=None
)
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. x = tf.constant(2.0)
tf.math.exp(x) ==> 7.389056
x = tf.constant([2.0, 8.0])
tf.math.exp(x) ==> array([7.389056, 2980.958], dtype=float32)
For complex numbers, the exponential value is calculated as follows: e^(x+iy) = e^x * e^iy = e^x * (cos y + i sin y)
Let's consider complex number 1+1j as an example. e^1 * (cos 1 + i sin 1) = 2.7182818284590 * (0.54030230586+0.8414709848j) x = tf.constant(1 + 1j)
tf.math.exp(x) ==> 1.4686939399158851+2.2873552871788423j
Args
x A Tensor. Must be one of the following types: bfloat16, half, float32, float64, complex64, complex128.
name A name for the operation (optional).
Returns A Tensor. Has the same type as x. | tensorflow.raw_ops.exp |
tf.raw_ops.ExpandDims Inserts a dimension of 1 into a tensor's shape. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.ExpandDims
tf.raw_ops.ExpandDims(
input, axis, name=None
)
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]. Other examples: # 't' is a tensor of shape [2]
shape(expand_dims(t, 0)) ==> [1, 2]
shape(expand_dims(t, 1)) ==> [2, 1]
shape(expand_dims(t, -1)) ==> [2, 1]
# 't2' is a tensor of shape [2, 3, 5]
shape(expand_dims(t2, 0)) ==> [1, 2, 3, 5]
shape(expand_dims(t2, 2)) ==> [2, 3, 1, 5]
shape(expand_dims(t2, 3)) ==> [2, 3, 5, 1]
This operation requires that: -1-input.dims() <= dim <= input.dims() This operation is related to squeeze(), which removes dimensions of size 1.
Args
input A Tensor.
axis A Tensor. Must be one of the following types: int32, int64. 0-D (scalar). Specifies the dimension index at which to expand the shape of input. Must be in the range [-rank(input) - 1, rank(input)].
name A name for the operation (optional).
Returns A Tensor. Has the same type as input. | tensorflow.raw_ops.expanddims |
tf.raw_ops.ExperimentalAssertNextDataset View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.ExperimentalAssertNextDataset
tf.raw_ops.ExperimentalAssertNextDataset(
input_dataset, transformations, output_types, output_shapes, name=None
)
Args
input_dataset A Tensor of type variant.
transformations A Tensor of type string.
output_types A list of tf.DTypes that has length >= 1.
output_shapes A list of shapes (each a tf.TensorShape or list of ints) that has length >= 1.
name A name for the operation (optional).
Returns A Tensor of type variant. | tensorflow.raw_ops.experimentalassertnextdataset |
tf.raw_ops.ExperimentalAutoShardDataset Creates a dataset that shards the input dataset. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.ExperimentalAutoShardDataset
tf.raw_ops.ExperimentalAutoShardDataset(
input_dataset, num_workers, index, output_types, output_shapes,
auto_shard_policy=0, name=None
)
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.
Args
input_dataset A Tensor of type variant. A variant tensor representing the input dataset.
num_workers A Tensor of type int64. A scalar representing the number of workers to distribute this dataset across.
index A Tensor of type int64. A scalar representing the index of the current worker out of num_workers.
output_types A list of tf.DTypes that has length >= 1.
output_shapes A list of shapes (each a tf.TensorShape or list of ints) that has length >= 1.
auto_shard_policy An optional int. Defaults to 0.
name A name for the operation (optional).
Returns A Tensor of type variant. | tensorflow.raw_ops.experimentalautosharddataset |
tf.raw_ops.ExperimentalBytesProducedStatsDataset Records the bytes size of each element of input_dataset in a StatsAggregator. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.ExperimentalBytesProducedStatsDataset
tf.raw_ops.ExperimentalBytesProducedStatsDataset(
input_dataset, tag, output_types, output_shapes, name=None
)
Args
input_dataset A Tensor of type variant.
tag A Tensor of type string.
output_types A list of tf.DTypes that has length >= 1.
output_shapes A list of shapes (each a tf.TensorShape or list of ints) that has length >= 1.
name A name for the operation (optional).
Returns A Tensor of type variant. | tensorflow.raw_ops.experimentalbytesproducedstatsdataset |
tf.raw_ops.ExperimentalChooseFastestDataset View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.ExperimentalChooseFastestDataset
tf.raw_ops.ExperimentalChooseFastestDataset(
input_datasets, num_experiments, output_types, output_shapes, name=None
)
Args
input_datasets A list of at least 2 Tensor objects with type variant.
num_experiments An int.
output_types A list of tf.DTypes that has length >= 1.
output_shapes A list of shapes (each a tf.TensorShape or list of ints) that has length >= 1.
name A name for the operation (optional).
Returns A Tensor of type variant. | tensorflow.raw_ops.experimentalchoosefastestdataset |
tf.raw_ops.ExperimentalCSVDataset View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.ExperimentalCSVDataset
tf.raw_ops.ExperimentalCSVDataset(
filenames, compression_type, buffer_size, header, field_delim, use_quote_delim,
na_value, select_cols, record_defaults, output_shapes, name=None
)
Args
filenames A Tensor of type string.
compression_type A Tensor of type string.
buffer_size A Tensor of type int64.
header A Tensor of type bool.
field_delim A Tensor of type string.
use_quote_delim A Tensor of type bool.
na_value A Tensor of type string.
select_cols A Tensor of type int64.
record_defaults A list of Tensor objects with types from: float32, float64, int32, int64, string.
output_shapes A list of shapes (each a tf.TensorShape or list of ints) that has length >= 1.
name A name for the operation (optional).
Returns A Tensor of type variant. | tensorflow.raw_ops.experimentalcsvdataset |
tf.raw_ops.ExperimentalDatasetCardinality Returns the cardinality of input_dataset. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.ExperimentalDatasetCardinality
tf.raw_ops.ExperimentalDatasetCardinality(
input_dataset, name=None
)
Returns the cardinality of input_dataset.
Args
input_dataset A Tensor of type variant. A variant tensor representing the dataset to return cardinality for.
name A name for the operation (optional).
Returns A Tensor of type int64. | tensorflow.raw_ops.experimentaldatasetcardinality |
tf.raw_ops.ExperimentalDatasetToTFRecord Writes the given dataset to the given file using the TFRecord format. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.ExperimentalDatasetToTFRecord
tf.raw_ops.ExperimentalDatasetToTFRecord(
input_dataset, filename, compression_type, name=None
)
Args
input_dataset A Tensor of type variant. A variant tensor representing the dataset to write.
filename A Tensor of type string. A scalar string tensor representing the filename to use.
compression_type A Tensor of type string. A scalar string tensor containing either (i) the empty string (no compression), (ii) "ZLIB", or (iii) "GZIP".
name A name for the operation (optional).
Returns The created Operation. | tensorflow.raw_ops.experimentaldatasettotfrecord |
tf.raw_ops.ExperimentalDenseToSparseBatchDataset Creates a dataset that batches input elements into a SparseTensor. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.ExperimentalDenseToSparseBatchDataset
tf.raw_ops.ExperimentalDenseToSparseBatchDataset(
input_dataset, batch_size, row_shape, output_types, output_shapes, name=None
)
Args
input_dataset A Tensor of type variant. A handle to an input dataset. Must have a single component.
batch_size A Tensor of type int64. A scalar representing the number of elements to accumulate in a batch.
row_shape A Tensor of type int64. A vector representing the dense shape of each row in the produced SparseTensor. The shape may be partially specified, using -1 to indicate that a particular dimension should use the maximum size of all batch elements.
output_types A list of tf.DTypes that has length >= 1.
output_shapes A list of shapes (each a tf.TensorShape or list of ints) that has length >= 1.
name A name for the operation (optional).
Returns A Tensor of type variant. | tensorflow.raw_ops.experimentaldensetosparsebatchdataset |
tf.raw_ops.ExperimentalDirectedInterleaveDataset A substitute for InterleaveDataset on a fixed list of N datasets. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.ExperimentalDirectedInterleaveDataset
tf.raw_ops.ExperimentalDirectedInterleaveDataset(
selector_input_dataset, data_input_datasets, output_types, output_shapes,
name=None
)
Args
selector_input_dataset A Tensor of type variant. A dataset of scalar DT_INT64 elements that determines which of the N data inputs should produce the next output element.
data_input_datasets A list of at least 1 Tensor objects with type variant. N datasets with the same type that will be interleaved according to the values of selector_input_dataset.
output_types A list of tf.DTypes that has length >= 1.
output_shapes A list of shapes (each a tf.TensorShape or list of ints) that has length >= 1.
name A name for the operation (optional).
Returns A Tensor of type variant. | tensorflow.raw_ops.experimentaldirectedinterleavedataset |
tf.raw_ops.ExperimentalGroupByReducerDataset Creates a dataset that computes a group-by on input_dataset. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.ExperimentalGroupByReducerDataset
tf.raw_ops.ExperimentalGroupByReducerDataset(
input_dataset, key_func_other_arguments, init_func_other_arguments,
reduce_func_other_arguments, finalize_func_other_arguments, key_func, init_func,
reduce_func, finalize_func, output_types, output_shapes, name=None
)
Creates a dataset that computes a group-by on input_dataset.
Args
input_dataset A Tensor of type variant. A variant tensor representing the input dataset.
key_func_other_arguments A list of Tensor objects. A list of tensors, typically values that were captured when building a closure for key_func.
init_func_other_arguments A list of Tensor objects. A list of tensors, typically values that were captured when building a closure for init_func.
reduce_func_other_arguments A list of Tensor objects. A list of tensors, typically values that were captured when building a closure for reduce_func.
finalize_func_other_arguments A list of Tensor objects. A list of tensors, typically values that were captured when building a closure for finalize_func.
key_func A function decorated with @Defun. A function mapping an element of input_dataset, concatenated with key_func_other_arguments to a scalar value of type DT_INT64.
init_func A function decorated with @Defun. A function mapping a key of type DT_INT64, concatenated with init_func_other_arguments to the initial reducer state.
reduce_func A function decorated with @Defun. A function mapping the current reducer state and an element of input_dataset, concatenated with reduce_func_other_arguments to a new reducer state.
finalize_func A function decorated with @Defun. A function mapping the final reducer state to an output element.
output_types A list of tf.DTypes that has length >= 1.
output_shapes A list of shapes (each a tf.TensorShape or list of ints) that has length >= 1.
name A name for the operation (optional).
Returns A Tensor of type variant. | tensorflow.raw_ops.experimentalgroupbyreducerdataset |
tf.raw_ops.ExperimentalGroupByWindowDataset Creates a dataset that computes a windowed group-by on input_dataset. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.ExperimentalGroupByWindowDataset
tf.raw_ops.ExperimentalGroupByWindowDataset(
input_dataset, key_func_other_arguments, reduce_func_other_arguments,
window_size_func_other_arguments, key_func, reduce_func, window_size_func,
output_types, output_shapes, name=None
)
//
Args
input_dataset A Tensor of type variant.
key_func_other_arguments A list of Tensor objects.
reduce_func_other_arguments A list of Tensor objects.
window_size_func_other_arguments A list of Tensor objects.
key_func A function decorated with @Defun. A function mapping an element of input_dataset, concatenated with key_func_other_arguments to a scalar value of type DT_INT64.
reduce_func A function decorated with @Defun.
window_size_func A function decorated with @Defun.
output_types A list of tf.DTypes that has length >= 1.
output_shapes A list of shapes (each a tf.TensorShape or list of ints) that has length >= 1.
name A name for the operation (optional).
Returns A Tensor of type variant. | tensorflow.raw_ops.experimentalgroupbywindowdataset |
tf.raw_ops.ExperimentalIgnoreErrorsDataset Creates a dataset that contains the elements of input_dataset ignoring errors. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.ExperimentalIgnoreErrorsDataset
tf.raw_ops.ExperimentalIgnoreErrorsDataset(
input_dataset, output_types, output_shapes, log_warning=False, name=None
)
Args
input_dataset A Tensor of type variant.
output_types A list of tf.DTypes that has length >= 1.
output_shapes A list of shapes (each a tf.TensorShape or list of ints) that has length >= 1.
log_warning An optional bool. Defaults to False.
name A name for the operation (optional).
Returns A Tensor of type variant. | tensorflow.raw_ops.experimentalignoreerrorsdataset |
tf.raw_ops.ExperimentalIteratorGetDevice Returns the name of the device on which resource has been placed. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.ExperimentalIteratorGetDevice
tf.raw_ops.ExperimentalIteratorGetDevice(
resource, name=None
)
Args
resource A Tensor of type resource.
name A name for the operation (optional).
Returns A Tensor of type string. | tensorflow.raw_ops.experimentaliteratorgetdevice |
tf.raw_ops.ExperimentalLatencyStatsDataset Records the latency of producing input_dataset elements in a StatsAggregator. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.ExperimentalLatencyStatsDataset
tf.raw_ops.ExperimentalLatencyStatsDataset(
input_dataset, tag, output_types, output_shapes, name=None
)
Args
input_dataset A Tensor of type variant.
tag A Tensor of type string.
output_types A list of tf.DTypes that has length >= 1.
output_shapes A list of shapes (each a tf.TensorShape or list of ints) that has length >= 1.
name A name for the operation (optional).
Returns A Tensor of type variant. | tensorflow.raw_ops.experimentallatencystatsdataset |
tf.raw_ops.ExperimentalLMDBDataset View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.ExperimentalLMDBDataset
tf.raw_ops.ExperimentalLMDBDataset(
filenames, output_types, output_shapes, name=None
)
Args
filenames A Tensor of type string.
output_types A list of tf.DTypes that has length >= 1.
output_shapes A list of shapes (each a tf.TensorShape or list of ints) that has length >= 1.
name A name for the operation (optional).
Returns A Tensor of type variant. | tensorflow.raw_ops.experimentallmdbdataset |
tf.raw_ops.ExperimentalMapAndBatchDataset Creates a dataset that fuses mapping with batching. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.ExperimentalMapAndBatchDataset
tf.raw_ops.ExperimentalMapAndBatchDataset(
input_dataset, other_arguments, batch_size, num_parallel_calls, drop_remainder,
f, output_types, output_shapes, preserve_cardinality=False, name=None
)
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.
Args
input_dataset A Tensor of type variant. A variant tensor representing the input dataset.
other_arguments A list of Tensor objects. A list of tensors, typically values that were captured when building a closure for f.
batch_size A Tensor of type int64. A scalar representing the number of elements to accumulate in a batch. It determines the number of concurrent invocations of f that process elements from input_dataset in parallel.
num_parallel_calls A Tensor of type int64. A scalar representing the maximum number of parallel invocations of the map_fn function. Applying the map_fn on consecutive input elements in parallel has the potential to improve input pipeline throughput.
drop_remainder A Tensor of type bool. A scalar representing whether the last batch should be dropped in case its size is smaller than desired.
f A function decorated with @Defun. A function to apply to the outputs of input_dataset.
output_types A list of tf.DTypes that has length >= 1.
output_shapes A list of shapes (each a tf.TensorShape or list of ints) that has length >= 1.
preserve_cardinality An optional bool. Defaults to False.
name A name for the operation (optional).
Returns A Tensor of type variant. | tensorflow.raw_ops.experimentalmapandbatchdataset |
tf.raw_ops.ExperimentalMapDataset Creates a dataset that applies f to the outputs of input_dataset. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.ExperimentalMapDataset
tf.raw_ops.ExperimentalMapDataset(
input_dataset, other_arguments, f, output_types, output_shapes,
use_inter_op_parallelism=True, preserve_cardinality=False, name=None
)
Args
input_dataset A Tensor of type variant.
other_arguments A list of Tensor objects.
f A function decorated with @Defun.
output_types A list of tf.DTypes that has length >= 1.
output_shapes A list of shapes (each a tf.TensorShape or list of ints) that has length >= 1.
use_inter_op_parallelism An optional bool. Defaults to True.
preserve_cardinality An optional bool. Defaults to False.
name A name for the operation (optional).
Returns A Tensor of type variant. | tensorflow.raw_ops.experimentalmapdataset |
tf.raw_ops.ExperimentalMatchingFilesDataset View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.ExperimentalMatchingFilesDataset
tf.raw_ops.ExperimentalMatchingFilesDataset(
patterns, name=None
)
Args
patterns A Tensor of type string.
name A name for the operation (optional).
Returns A Tensor of type variant. | tensorflow.raw_ops.experimentalmatchingfilesdataset |
tf.raw_ops.ExperimentalMaxIntraOpParallelismDataset Creates a dataset that overrides the maximum intra-op parallelism. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.ExperimentalMaxIntraOpParallelismDataset
tf.raw_ops.ExperimentalMaxIntraOpParallelismDataset(
input_dataset, max_intra_op_parallelism, output_types, output_shapes, name=None
)
Args
input_dataset A Tensor of type variant.
max_intra_op_parallelism A Tensor of type int64. Identifies the maximum intra-op parallelism to use.
output_types A list of tf.DTypes that has length >= 1.
output_shapes A list of shapes (each a tf.TensorShape or list of ints) that has length >= 1.
name A name for the operation (optional).
Returns A Tensor of type variant. | tensorflow.raw_ops.experimentalmaxintraopparallelismdataset |
tf.raw_ops.ExperimentalNonSerializableDataset View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.ExperimentalNonSerializableDataset
tf.raw_ops.ExperimentalNonSerializableDataset(
input_dataset, output_types, output_shapes, name=None
)
Args
input_dataset A Tensor of type variant.
output_types A list of tf.DTypes that has length >= 1.
output_shapes A list of shapes (each a tf.TensorShape or list of ints) that has length >= 1.
name A name for the operation (optional).
Returns A Tensor of type variant. | tensorflow.raw_ops.experimentalnonserializabledataset |
tf.raw_ops.ExperimentalParallelInterleaveDataset Creates a dataset that applies f to the outputs of input_dataset. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.ExperimentalParallelInterleaveDataset
tf.raw_ops.ExperimentalParallelInterleaveDataset(
input_dataset, other_arguments, cycle_length, block_length, sloppy,
buffer_output_elements, prefetch_input_elements, f, output_types, output_shapes,
name=None
)
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!
Args
input_dataset A Tensor of type variant.
other_arguments A list of Tensor objects.
cycle_length A Tensor of type int64.
block_length A Tensor of type int64.
sloppy A Tensor of type bool.
buffer_output_elements A Tensor of type int64.
prefetch_input_elements A Tensor of type int64.
f A function decorated with @Defun. A function mapping elements of input_dataset, concatenated with other_arguments, to a Dataset variant that contains elements matching output_types and output_shapes.
output_types A list of tf.DTypes that has length >= 1.
output_shapes A list of shapes (each a tf.TensorShape or list of ints) that has length >= 1.
name A name for the operation (optional).
Returns A Tensor of type variant. | tensorflow.raw_ops.experimentalparallelinterleavedataset |
tf.raw_ops.ExperimentalParseExampleDataset Transforms input_dataset containing Example protos as vectors of DT_STRING into a dataset of Tensor or SparseTensor objects representing the parsed features. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.ExperimentalParseExampleDataset
tf.raw_ops.ExperimentalParseExampleDataset(
input_dataset, num_parallel_calls, dense_defaults, sparse_keys, dense_keys,
sparse_types, dense_shapes, output_types, output_shapes, sloppy=False, name=None
)
Args
input_dataset A Tensor of type variant.
num_parallel_calls A Tensor of type int64.
dense_defaults A list of Tensor objects with types from: float32, int64, string. A dict mapping string keys to Tensors. The keys of the dict must match the dense_keys of the feature.
sparse_keys A list of strings. A list of string keys in the examples features. The results for these keys will be returned as SparseTensor objects.
dense_keys A list of strings. A list of Ndense string Tensors (scalars). The keys expected in the Examples features associated with dense values.
sparse_types A list of tf.DTypes from: tf.float32, tf.int64, tf.string. A list of DTypes of the same length as sparse_keys. Only tf.float32 (FloatList), tf.int64 (Int64List), and tf.string (BytesList) are supported.
dense_shapes A list of shapes (each a tf.TensorShape or list of ints). List of tuples with the same length as dense_keys. The shape of the data for each dense feature referenced by dense_keys. Required for any input tensors identified by dense_keys. Must be either fully defined, or may contain an unknown first dimension. An unknown first dimension means the feature is treated as having a variable number of blocks, and the output shape along this dimension is considered unknown at graph build time. Padding is applied for minibatch elements smaller than the maximum number of blocks for the given feature along this dimension.
output_types A list of tf.DTypes that has length >= 1. The type list for the return values.
output_shapes A list of shapes (each a tf.TensorShape or list of ints) that has length >= 1. The list of shapes being produced.
sloppy An optional bool. Defaults to False.
name A name for the operation (optional).
Returns A Tensor of type variant. | tensorflow.raw_ops.experimentalparseexampledataset |
tf.raw_ops.ExperimentalPrivateThreadPoolDataset Creates a dataset that uses a custom thread pool to compute input_dataset. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.ExperimentalPrivateThreadPoolDataset
tf.raw_ops.ExperimentalPrivateThreadPoolDataset(
input_dataset, num_threads, output_types, output_shapes, name=None
)
Args
input_dataset A Tensor of type variant.
num_threads A Tensor of type int64. Identifies the number of threads to use for the private threadpool.
output_types A list of tf.DTypes that has length >= 1.
output_shapes A list of shapes (each a tf.TensorShape or list of ints) that has length >= 1.
name A name for the operation (optional).
Returns A Tensor of type variant. | tensorflow.raw_ops.experimentalprivatethreadpooldataset |
tf.raw_ops.ExperimentalRandomDataset Creates a Dataset that returns pseudorandom numbers. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.ExperimentalRandomDataset
tf.raw_ops.ExperimentalRandomDataset(
seed, seed2, output_types, output_shapes, name=None
)
Args
seed A Tensor of type int64. A scalar seed for the random number generator. If either seed or seed2 is set to be non-zero, the random number generator is seeded by the given seed. Otherwise, a random seed is used.
seed2 A Tensor of type int64. A second scalar seed to avoid seed collision.
output_types A list of tf.DTypes that has length >= 1.
output_shapes A list of shapes (each a tf.TensorShape or list of ints) that has length >= 1.
name A name for the operation (optional).
Returns A Tensor of type variant. | tensorflow.raw_ops.experimentalrandomdataset |
tf.raw_ops.ExperimentalRebatchDataset Creates a dataset that changes the batch size. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.ExperimentalRebatchDataset
tf.raw_ops.ExperimentalRebatchDataset(
input_dataset, num_replicas, output_types, output_shapes, use_fallback=True,
name=None
)
Creates a dataset that changes the batch size of the dataset to current batch size // num_replicas.
Args
input_dataset A Tensor of type variant. A variant tensor representing the input dataset.
num_replicas A Tensor of type int64. A scalar representing the number of replicas to distribute this batch across. As a result of this transformation the current batch size would end up being divided by this parameter.
output_types A list of tf.DTypes that has length >= 1.
output_shapes A list of shapes (each a tf.TensorShape or list of ints) that has length >= 1.
use_fallback An optional bool. Defaults to True.
name A name for the operation (optional).
Returns A Tensor of type variant. | tensorflow.raw_ops.experimentalrebatchdataset |
tf.raw_ops.ExperimentalScanDataset Creates a dataset successively reduces f over the elements of input_dataset. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.ExperimentalScanDataset
tf.raw_ops.ExperimentalScanDataset(
input_dataset, initial_state, other_arguments, f, output_types, output_shapes,
preserve_cardinality=False, name=None
)
Args
input_dataset A Tensor of type variant.
initial_state A list of Tensor objects.
other_arguments A list of Tensor objects.
f A function decorated with @Defun.
output_types A list of tf.DTypes that has length >= 1.
output_shapes A list of shapes (each a tf.TensorShape or list of ints) that has length >= 1.
preserve_cardinality An optional bool. Defaults to False.
name A name for the operation (optional).
Returns A Tensor of type variant. | tensorflow.raw_ops.experimentalscandataset |
tf.raw_ops.ExperimentalSetStatsAggregatorDataset View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.ExperimentalSetStatsAggregatorDataset
tf.raw_ops.ExperimentalSetStatsAggregatorDataset(
input_dataset, stats_aggregator, tag, counter_prefix, output_types,
output_shapes, name=None
)
Args
input_dataset A Tensor of type variant.
stats_aggregator A Tensor of type resource.
tag A Tensor of type string.
counter_prefix A Tensor of type string.
output_types A list of tf.DTypes that has length >= 1.
output_shapes A list of shapes (each a tf.TensorShape or list of ints) that has length >= 1.
name A name for the operation (optional).
Returns A Tensor of type variant. | tensorflow.raw_ops.experimentalsetstatsaggregatordataset |
tf.raw_ops.ExperimentalSleepDataset View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.ExperimentalSleepDataset
tf.raw_ops.ExperimentalSleepDataset(
input_dataset, sleep_microseconds, output_types, output_shapes, name=None
)
Args
input_dataset A Tensor of type variant.
sleep_microseconds A Tensor of type int64.
output_types A list of tf.DTypes that has length >= 1.
output_shapes A list of shapes (each a tf.TensorShape or list of ints) that has length >= 1.
name A name for the operation (optional).
Returns A Tensor of type variant. | tensorflow.raw_ops.experimentalsleepdataset |
tf.raw_ops.ExperimentalSlidingWindowDataset Creates a dataset that passes a sliding window over input_dataset. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.ExperimentalSlidingWindowDataset
tf.raw_ops.ExperimentalSlidingWindowDataset(
input_dataset, window_size, window_shift, window_stride, output_types,
output_shapes, name=None
)
Args
input_dataset A Tensor of type variant.
window_size A Tensor of type int64. A scalar representing the number of elements in the sliding window.
window_shift A Tensor of type int64. A scalar representing the steps moving the sliding window forward in one iteration. It must be positive.
window_stride A Tensor of type int64. A scalar representing the stride of the input elements of the sliding window. It must be positive.
output_types A list of tf.DTypes that has length >= 1.
output_shapes A list of shapes (each a tf.TensorShape or list of ints) that has length >= 1.
name A name for the operation (optional).
Returns A Tensor of type variant. | tensorflow.raw_ops.experimentalslidingwindowdataset |
tf.raw_ops.ExperimentalSqlDataset Creates a dataset that executes a SQL query and emits rows of the result set. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.ExperimentalSqlDataset
tf.raw_ops.ExperimentalSqlDataset(
driver_name, data_source_name, query, output_types, output_shapes, name=None
)
Args
driver_name A Tensor of type string. The database type. Currently, the only supported type is 'sqlite'.
data_source_name A Tensor of type string. A connection string to connect to the database.
query A Tensor of type string. A SQL query to execute.
output_types A list of tf.DTypes that has length >= 1.
output_shapes A list of shapes (each a tf.TensorShape or list of ints) that has length >= 1.
name A name for the operation (optional).
Returns A Tensor of type variant. | tensorflow.raw_ops.experimentalsqldataset |
tf.raw_ops.ExperimentalStatsAggregatorHandle Creates a statistics manager resource. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.ExperimentalStatsAggregatorHandle
tf.raw_ops.ExperimentalStatsAggregatorHandle(
container='', shared_name='', name=None
)
Args
container An optional string. Defaults to "".
shared_name An optional string. Defaults to "".
name A name for the operation (optional).
Returns A Tensor of type resource. | tensorflow.raw_ops.experimentalstatsaggregatorhandle |
tf.raw_ops.ExperimentalStatsAggregatorSummary Produces a summary of any statistics recorded by the given statistics manager. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.ExperimentalStatsAggregatorSummary
tf.raw_ops.ExperimentalStatsAggregatorSummary(
iterator, name=None
)
Args
iterator A Tensor of type resource.
name A name for the operation (optional).
Returns A Tensor of type string. | tensorflow.raw_ops.experimentalstatsaggregatorsummary |
tf.raw_ops.ExperimentalTakeWhileDataset Creates a dataset that stops iteration when predicate` is false. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.ExperimentalTakeWhileDataset
tf.raw_ops.ExperimentalTakeWhileDataset(
input_dataset, other_arguments, predicate, output_types, output_shapes,
name=None
)
The predicate function must return a scalar boolean and accept the following arguments: One tensor for each component of an element of input_dataset. One tensor for each value in other_arguments.
Args
input_dataset A Tensor of type variant.
other_arguments A list of Tensor objects. A list of tensors, typically values that were captured when building a closure for predicate.
predicate A function decorated with @Defun. A function returning a scalar boolean.
output_types A list of tf.DTypes that has length >= 1.
output_shapes A list of shapes (each a tf.TensorShape or list of ints) that has length >= 1.
name A name for the operation (optional).
Returns A Tensor of type variant. | tensorflow.raw_ops.experimentaltakewhiledataset |
tf.raw_ops.ExperimentalThreadPoolDataset Creates a dataset that uses a custom thread pool to compute input_dataset. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.ExperimentalThreadPoolDataset
tf.raw_ops.ExperimentalThreadPoolDataset(
input_dataset, thread_pool, output_types, output_shapes, name=None
)
Args
input_dataset A Tensor of type variant.
thread_pool A Tensor of type resource. A resource produced by the ThreadPoolHandle op.
output_types A list of tf.DTypes that has length >= 1.
output_shapes A list of shapes (each a tf.TensorShape or list of ints) that has length >= 1.
name A name for the operation (optional).
Returns A Tensor of type variant. | tensorflow.raw_ops.experimentalthreadpooldataset |
tf.raw_ops.ExperimentalThreadPoolHandle Creates a dataset that uses a custom thread pool to compute input_dataset. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.ExperimentalThreadPoolHandle
tf.raw_ops.ExperimentalThreadPoolHandle(
num_threads, display_name, max_intra_op_parallelism=1, container='',
shared_name='', name=None
)
Args
num_threads An int. The number of threads in the thread pool.
display_name A string. A human-readable name for the threads that may be visible in some visualizations. threadpool.
max_intra_op_parallelism An optional int. Defaults to 1. The maximum degree of parallelism to use within operations that execute on this threadpool.
container An optional string. Defaults to "".
shared_name An optional string. Defaults to "".
name A name for the operation (optional).
Returns A Tensor of type resource. | tensorflow.raw_ops.experimentalthreadpoolhandle |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.