doc_content
stringlengths 1
386k
| doc_id
stringlengths 5
188
|
---|---|
tf.raw_ops.InitializeTableV2 Table initializer that takes two tensors for keys and values respectively. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.InitializeTableV2
tf.raw_ops.InitializeTableV2(
table_handle, keys, values, name=None
)
Args
table_handle A Tensor of type resource. Handle to a table which will be initialized.
keys A Tensor. Keys of type Tkey.
values A Tensor. Values of type Tval.
name A name for the operation (optional).
Returns The created Operation. | tensorflow.raw_ops.initializetablev2 |
tf.raw_ops.InplaceAdd Adds v into specified rows of x. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.InplaceAdd
tf.raw_ops.InplaceAdd(
x, i, v, name=None
)
Computes y = x; y[i, :] += v; return y.
Args
x A Tensor. A Tensor of type T.
i A Tensor of type int32. A vector. Indices into the left-most dimension of x.
v A Tensor. Must have the same type as x. A Tensor of type T. Same dimension sizes as x except the first dimension, which must be the same as i's size.
name A name for the operation (optional).
Returns A Tensor. Has the same type as x. | tensorflow.raw_ops.inplaceadd |
tf.raw_ops.InplaceSub Subtracts v into specified rows of x. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.InplaceSub
tf.raw_ops.InplaceSub(
x, i, v, name=None
)
Computes y = x; y[i, :] -= v; return y.
Args
x A Tensor. A Tensor of type T.
i A Tensor of type int32. A vector. Indices into the left-most dimension of x.
v A Tensor. Must have the same type as x. A Tensor of type T. Same dimension sizes as x except the first dimension, which must be the same as i's size.
name A name for the operation (optional).
Returns A Tensor. Has the same type as x. | tensorflow.raw_ops.inplacesub |
tf.raw_ops.InplaceUpdate Updates specified rows 'i' with values 'v'. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.InplaceUpdate
tf.raw_ops.InplaceUpdate(
x, i, v, name=None
)
Computes x[i, :] = v; return x. Originally this function is mutative however for compilation we make this operation create / operate on a copy of x.
Args
x A Tensor. A tensor of type T.
i A Tensor of type int32. A vector. Indices into the left-most dimension of x.
v A Tensor. Must have the same type as x. A Tensor of type T. Same dimension sizes as x except the first dimension, which must be the same as i's size.
name A name for the operation (optional).
Returns A Tensor. Has the same type as x. | tensorflow.raw_ops.inplaceupdate |
tf.raw_ops.InterleaveDataset 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.InterleaveDataset
tf.raw_ops.InterleaveDataset(
input_dataset, other_arguments, cycle_length, block_length, f, output_types,
output_shapes, name=None
)
Unlike MapDataset, the f in InterleaveDataset is expected to return a Dataset variant, and InterleaveDataset will flatten successive results into a single Dataset. Unlike FlatMapDataset, InterleaveDataset will interleave sequences of up to block_length consecutive elements from cycle_length input elements.
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.
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.interleavedataset |
tf.raw_ops.InTopK Says whether the targets are in the top K predictions. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.InTopK
tf.raw_ops.InTopK(
predictions, targets, k, name=None
)
This outputs a batch_size bool array, an entry out[i] is true if the prediction for the target class is among the top k predictions among all predictions for example i. Note that the behavior of InTopK differs from the TopK op in its handling of ties; if multiple classes have the same prediction value and straddle the top-k boundary, all of those classes are considered to be in the top k. More formally, let \(predictions_i\) be the predictions for all classes for example i, \(targets_i\) be the target class for example i, \(out_i\) be the output for example i, $$out_i = predictions_{i, targets_i} \in TopKIncludingTies(predictions_i)$$
Args
predictions A Tensor of type float32. A batch_size x classes tensor.
targets A Tensor. Must be one of the following types: int32, int64. A batch_size vector of class ids.
k An int. Number of top elements to look at for computing precision.
name A name for the operation (optional).
Returns A Tensor of type bool. | tensorflow.raw_ops.intopk |
tf.raw_ops.InTopKV2 Says whether the targets are in the top K predictions. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.InTopKV2
tf.raw_ops.InTopKV2(
predictions, targets, k, name=None
)
This outputs a batch_size bool array, an entry out[i] is true if the prediction for the target class is among the top k predictions among all predictions for example i. Note that the behavior of InTopK differs from the TopK op in its handling of ties; if multiple classes have the same prediction value and straddle the top-k boundary, all of those classes are considered to be in the top k. More formally, let \(predictions_i\) be the predictions for all classes for example i, \(targets_i\) be the target class for example i, \(out_i\) be the output for example i, $$out_i = predictions_{i, targets_i} \in TopKIncludingTies(predictions_i)$$
Args
predictions A Tensor of type float32. A batch_size x classes tensor.
targets A Tensor. Must be one of the following types: int32, int64. A batch_size vector of class ids.
k A Tensor. Must have the same type as targets. Number of top elements to look at for computing precision.
name A name for the operation (optional).
Returns A Tensor of type bool. | tensorflow.raw_ops.intopkv2 |
tf.raw_ops.Inv Computes the reciprocal of x element-wise. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.Inv
tf.raw_ops.Inv(
x, name=None
)
I.e., \(y = 1 / x\).
Args
x A Tensor. Must be one of the following types: bfloat16, half, float32, float64, int8, int16, int32, int64, complex64, complex128.
name A name for the operation (optional).
Returns A Tensor. Has the same type as x. | tensorflow.raw_ops.inv |
tf.raw_ops.Invert Invert (flip) each bit of supported types; for example, type uint8 value 01010101 becomes 10101010. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.Invert
tf.raw_ops.Invert(
x, name=None
)
Flip each bit of supported types. For example, type int8 (decimal 2) binary 00000010 becomes (decimal -3) binary 11111101. This operation is performed on each element of the tensor argument x. Example: import tensorflow as tf
from tensorflow.python.ops import bitwise_ops
# flip 2 (00000010) to -3 (11111101)
tf.assert_equal(-3, bitwise_ops.invert(2))
dtype_list = [dtypes.int8, dtypes.int16, dtypes.int32, dtypes.int64,
dtypes.uint8, dtypes.uint16, dtypes.uint32, dtypes.uint64]
inputs = [0, 5, 3, 14]
for dtype in dtype_list:
# Because of issues with negative numbers, let's test this indirectly.
# 1. invert(a) and a = 0
# 2. invert(a) or a = invert(0)
input_tensor = tf.constant([0, 5, 3, 14], dtype=dtype)
not_a_and_a, not_a_or_a, not_0 = [bitwise_ops.bitwise_and(
input_tensor, bitwise_ops.invert(input_tensor)),
bitwise_ops.bitwise_or(
input_tensor, bitwise_ops.invert(input_tensor)),
bitwise_ops.invert(
tf.constant(0, dtype=dtype))]
expected = tf.constant([0, 0, 0, 0], dtype=tf.float32)
tf.assert_equal(tf.cast(not_a_and_a, tf.float32), expected)
expected = tf.cast([not_0] * 4, tf.float32)
tf.assert_equal(tf.cast(not_a_or_a, tf.float32), expected)
# For unsigned dtypes let's also check the result directly.
if dtype.is_unsigned:
inverted = bitwise_ops.invert(input_tensor)
expected = tf.constant([dtype.max - x for x in inputs], dtype=tf.float32)
tf.assert_equal(tf.cast(inverted, tf.float32), tf.cast(expected, tf.float32))
Args
x A Tensor. Must be one of the following types: int8, int16, int32, int64, uint8, uint16, uint32, uint64.
name A name for the operation (optional).
Returns A Tensor. Has the same type as x. | tensorflow.raw_ops.invert |
tf.raw_ops.InvertPermutation Computes the inverse permutation of a tensor. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.InvertPermutation
tf.raw_ops.InvertPermutation(
x, name=None
)
This operation computes the inverse of an index permutation. It takes a 1-D integer tensor x, which represents the indices of a zero-based array, and swaps each value with its index position. In other words, for an output tensor y and an input tensor x, this operation computes the following: y[x[i]] = i for i in [0, 1, ..., len(x) - 1] The values must include 0. There can be no duplicate values or negative values. For example: # tensor `x` is [3, 4, 0, 2, 1]
invert_permutation(x) ==> [2, 4, 3, 0, 1]
Args
x A Tensor. Must be one of the following types: int32, int64. 1-D.
name A name for the operation (optional).
Returns A Tensor. Has the same type as x. | tensorflow.raw_ops.invertpermutation |
tf.raw_ops.InvGrad Computes the gradient for the inverse of x wrt its input. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.InvGrad
tf.raw_ops.InvGrad(
y, dy, name=None
)
Specifically, grad = -dy * y*y, where y = 1/x, and dy is the corresponding input gradient.
Args
y A Tensor. Must be one of the following types: bfloat16, half, float32, float64, complex64, complex128.
dy A Tensor. Must have the same type as y.
name A name for the operation (optional).
Returns A Tensor. Has the same type as y. | tensorflow.raw_ops.invgrad |
tf.raw_ops.IRFFT Inverse real-valued fast Fourier transform. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.IRFFT
tf.raw_ops.IRFFT(
input, fft_length, Treal=tf.dtypes.float32, name=None
)
Computes the inverse 1-dimensional discrete Fourier transform of a real-valued signal over the inner-most dimension of input. The inner-most dimension of input is assumed to be the result of RFFT: the fft_length / 2 + 1 unique components of the DFT of a real-valued signal. If fft_length is not provided, it is computed from the size of the inner-most dimension of input (fft_length = 2 * (inner - 1)). If the FFT length used to compute input is odd, it should be provided since it cannot be inferred properly. Along the axis IRFFT is computed on, if fft_length / 2 + 1 is smaller than the corresponding dimension of input, the dimension is cropped. If it is larger, the dimension is padded with zeros.
Args
input A Tensor. Must be one of the following types: complex64, complex128. A complex tensor.
fft_length A Tensor of type int32. An int32 tensor of shape [1]. The FFT length.
Treal An optional tf.DType from: tf.float32, tf.float64. Defaults to tf.float32.
name A name for the operation (optional).
Returns A Tensor of type Treal. | tensorflow.raw_ops.irfft |
tf.raw_ops.IRFFT2D Inverse 2D real-valued fast Fourier transform. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.IRFFT2D
tf.raw_ops.IRFFT2D(
input, fft_length, Treal=tf.dtypes.float32, name=None
)
Computes the inverse 2-dimensional discrete Fourier transform of a real-valued signal over the inner-most 2 dimensions of input. The inner-most 2 dimensions of input are assumed to be the result of RFFT2D: The inner-most dimension contains the fft_length / 2 + 1 unique components of the DFT of a real-valued signal. If fft_length is not provided, it is computed from the size of the inner-most 2 dimensions of input. If the FFT length used to compute input is odd, it should be provided since it cannot be inferred properly. Along each axis IRFFT2D is computed on, if fft_length (or fft_length / 2 + 1 for the inner-most dimension) is smaller than the corresponding dimension of input, the dimension is cropped. If it is larger, the dimension is padded with zeros.
Args
input A Tensor. Must be one of the following types: complex64, complex128. A complex tensor.
fft_length A Tensor of type int32. An int32 tensor of shape [2]. The FFT length for each dimension.
Treal An optional tf.DType from: tf.float32, tf.float64. Defaults to tf.float32.
name A name for the operation (optional).
Returns A Tensor of type Treal. | tensorflow.raw_ops.irfft2d |
tf.raw_ops.IRFFT3D Inverse 3D real-valued fast Fourier transform. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.IRFFT3D
tf.raw_ops.IRFFT3D(
input, fft_length, Treal=tf.dtypes.float32, name=None
)
Computes the inverse 3-dimensional discrete Fourier transform of a real-valued signal over the inner-most 3 dimensions of input. The inner-most 3 dimensions of input are assumed to be the result of RFFT3D: The inner-most dimension contains the fft_length / 2 + 1 unique components of the DFT of a real-valued signal. If fft_length is not provided, it is computed from the size of the inner-most 3 dimensions of input. If the FFT length used to compute input is odd, it should be provided since it cannot be inferred properly. Along each axis IRFFT3D is computed on, if fft_length (or fft_length / 2 + 1 for the inner-most dimension) is smaller than the corresponding dimension of input, the dimension is cropped. If it is larger, the dimension is padded with zeros.
Args
input A Tensor. Must be one of the following types: complex64, complex128. A complex tensor.
fft_length A Tensor of type int32. An int32 tensor of shape [3]. The FFT length for each dimension.
Treal An optional tf.DType from: tf.float32, tf.float64. Defaults to tf.float32.
name A name for the operation (optional).
Returns A Tensor of type Treal. | tensorflow.raw_ops.irfft3d |
tf.raw_ops.IsBoostedTreesEnsembleInitialized Checks whether a tree ensemble has been initialized. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.IsBoostedTreesEnsembleInitialized
tf.raw_ops.IsBoostedTreesEnsembleInitialized(
tree_ensemble_handle, name=None
)
Args
tree_ensemble_handle A Tensor of type resource. Handle to the tree ensemble resource.
name A name for the operation (optional).
Returns A Tensor of type bool. | tensorflow.raw_ops.isboostedtreesensembleinitialized |
tf.raw_ops.IsBoostedTreesQuantileStreamResourceInitialized Checks whether a quantile stream has been initialized. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.IsBoostedTreesQuantileStreamResourceInitialized
tf.raw_ops.IsBoostedTreesQuantileStreamResourceInitialized(
quantile_stream_resource_handle, name=None
)
An Op that checks if quantile stream resource is initialized.
Args
quantile_stream_resource_handle A Tensor of type resource. resource; The reference to quantile stream resource handle.
name A name for the operation (optional).
Returns A Tensor of type bool. | tensorflow.raw_ops.isboostedtreesquantilestreamresourceinitialized |
tf.raw_ops.IsFinite Returns which elements of x are finite. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.IsFinite
tf.raw_ops.IsFinite(
x, name=None
)
Example: x = tf.constant([5.0, 4.8, 6.8, np.inf, np.nan])
tf.math.is_finite(x) ==> [True, True, True, False, False]
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 of type bool.
Numpy Compatibility Equivalent to np.isfinite | tensorflow.raw_ops.isfinite |
tf.raw_ops.IsInf Returns which elements of x are Inf. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.IsInf
tf.raw_ops.IsInf(
x, name=None
)
Example: x = tf.constant([5.0, np.inf, 6.8, np.inf])
tf.math.is_inf(x) ==> [False, True, False, True]
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 of type bool.
Numpy Compatibility Equivalent to np.isinf | tensorflow.raw_ops.isinf |
tf.raw_ops.IsNan Returns which elements of x are NaN. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.IsNan
tf.raw_ops.IsNan(
x, name=None
)
Example: x = tf.constant([5.0, np.nan, 6.8, np.nan, np.inf])
tf.math.is_nan(x) ==> [False, True, False, True, False]
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 of type bool.
Numpy Compatibility Equivalent to np.isnan | tensorflow.raw_ops.isnan |
tf.raw_ops.IsotonicRegression Solves a batch of isotonic regression problems. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.IsotonicRegression
tf.raw_ops.IsotonicRegression(
input, output_dtype=tf.dtypes.float32, 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. A (batch_size, dim)-tensor holding a batch of inputs.
output_dtype An optional tf.DType from: tf.half, tf.bfloat16, tf.float32, tf.float64. Defaults to tf.float32. Dtype of output.
name A name for the operation (optional).
Returns A tuple of Tensor objects (output, segments). output A Tensor of type output_dtype.
segments A Tensor of type int32. | tensorflow.raw_ops.isotonicregression |
tf.raw_ops.IsVariableInitialized Checks whether a tensor has been initialized. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.IsVariableInitialized
tf.raw_ops.IsVariableInitialized(
ref, name=None
)
Outputs boolean scalar indicating whether the tensor has been initialized.
Args
ref A mutable Tensor. Should be from a Variable node. May be uninitialized.
name A name for the operation (optional).
Returns A Tensor of type bool. | tensorflow.raw_ops.isvariableinitialized |
tf.raw_ops.Iterator A container for an iterator resource. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.Iterator
tf.raw_ops.Iterator(
shared_name, container, output_types, output_shapes, name=None
)
Args
shared_name A string.
container A 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 resource. | tensorflow.raw_ops.iterator |
tf.raw_ops.IteratorFromStringHandle Converts the given string representing a handle to an iterator to a resource. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.IteratorFromStringHandle
tf.raw_ops.IteratorFromStringHandle(
string_handle, output_types=[], output_shapes=[], name=None
)
Args
string_handle A Tensor of type string. A string representation of the given handle.
output_types An optional list of tf.DTypes. Defaults to []. If specified, defines the type of each tuple component in an element produced by the resulting iterator.
output_shapes An optional list of shapes (each a tf.TensorShape or list of ints). Defaults to []. If specified, defines the shape of each tuple component in an element produced by the resulting iterator.
name A name for the operation (optional).
Returns A Tensor of type resource. | tensorflow.raw_ops.iteratorfromstringhandle |
tf.raw_ops.IteratorFromStringHandleV2 View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.IteratorFromStringHandleV2
tf.raw_ops.IteratorFromStringHandleV2(
string_handle, output_types=[], output_shapes=[], name=None
)
Args
string_handle A Tensor of type string.
output_types An optional list of tf.DTypes. Defaults to [].
output_shapes An optional list of shapes (each a tf.TensorShape or list of ints). Defaults to [].
name A name for the operation (optional).
Returns A Tensor of type resource. | tensorflow.raw_ops.iteratorfromstringhandlev2 |
tf.raw_ops.IteratorGetDevice 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.IteratorGetDevice
tf.raw_ops.IteratorGetDevice(
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.iteratorgetdevice |
tf.raw_ops.IteratorGetNext Gets the next output from the given iterator . View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.IteratorGetNext
tf.raw_ops.IteratorGetNext(
iterator, output_types, output_shapes, name=None
)
Args
iterator A Tensor of type resource.
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 list of Tensor objects of type output_types. | tensorflow.raw_ops.iteratorgetnext |
tf.raw_ops.IteratorGetNextAsOptional Gets the next output from the given iterator as an Optional variant. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.IteratorGetNextAsOptional
tf.raw_ops.IteratorGetNextAsOptional(
iterator, output_types, output_shapes, name=None
)
Args
iterator A Tensor of type resource.
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.iteratorgetnextasoptional |
tf.raw_ops.IteratorGetNextSync Gets the next output from the given iterator. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.IteratorGetNextSync
tf.raw_ops.IteratorGetNextSync(
iterator, output_types, output_shapes, name=None
)
This operation is a synchronous version IteratorGetNext. It should only be used in situations where the iterator does not block the calling thread, or where the calling thread is not a member of the thread pool used to execute parallel operations (e.g. in eager mode).
Args
iterator A Tensor of type resource.
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 list of Tensor objects of type output_types. | tensorflow.raw_ops.iteratorgetnextsync |
tf.raw_ops.IteratorToStringHandle Converts the given resource_handle representing an iterator to a string. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.IteratorToStringHandle
tf.raw_ops.IteratorToStringHandle(
resource_handle, name=None
)
Args
resource_handle A Tensor of type resource. A handle to an iterator resource.
name A name for the operation (optional).
Returns A Tensor of type string. | tensorflow.raw_ops.iteratortostringhandle |
tf.raw_ops.IteratorV2 View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.IteratorV2
tf.raw_ops.IteratorV2(
shared_name, container, output_types, output_shapes, name=None
)
Args
shared_name A string.
container A 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 resource. | tensorflow.raw_ops.iteratorv2 |
tf.raw_ops.L2Loss L2 Loss. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.L2Loss
tf.raw_ops.L2Loss(
t, name=None
)
Computes half the L2 norm of a tensor without the sqrt: output = sum(t ** 2) / 2
Args
t A Tensor. Must be one of the following types: half, bfloat16, float32, float64. Typically 2-D, but may have any dimensions.
name A name for the operation (optional).
Returns A Tensor. Has the same type as t. | tensorflow.raw_ops.l2loss |
tf.raw_ops.LatencyStatsDataset 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.LatencyStatsDataset
tf.raw_ops.LatencyStatsDataset(
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.latencystatsdataset |
tf.raw_ops.LeakyRelu Computes rectified linear: max(features, features * alpha). View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.LeakyRelu
tf.raw_ops.LeakyRelu(
features, alpha=0.2, name=None
)
Args
features A Tensor. Must be one of the following types: half, bfloat16, float32, float64.
alpha An optional float. Defaults to 0.2.
name A name for the operation (optional).
Returns A Tensor. Has the same type as features. | tensorflow.raw_ops.leakyrelu |
tf.raw_ops.LeakyReluGrad Computes rectified linear gradients for a LeakyRelu operation. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.LeakyReluGrad
tf.raw_ops.LeakyReluGrad(
gradients, features, alpha=0.2, name=None
)
Args
gradients A Tensor. Must be one of the following types: half, bfloat16, float32, float64. The backpropagated gradients to the corresponding LeakyRelu operation.
features A Tensor. Must have the same type as gradients. The features passed as input to the corresponding LeakyRelu operation, OR the outputs of that operation (both work equivalently).
alpha An optional float. Defaults to 0.2.
name A name for the operation (optional).
Returns A Tensor. Has the same type as gradients. | tensorflow.raw_ops.leakyrelugrad |
tf.raw_ops.LearnedUnigramCandidateSampler Generates labels for candidate sampling with a learned unigram distribution. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.LearnedUnigramCandidateSampler
tf.raw_ops.LearnedUnigramCandidateSampler(
true_classes, num_true, num_sampled, unique, range_max, seed=0, seed2=0,
name=None
)
See explanations of candidate sampling and the data formats at go/candidate-sampling. For each batch, this op picks a single set of sampled candidate labels. The advantages of sampling candidates per-batch are simplicity and the possibility of efficient dense matrix multiplication. The disadvantage is that the sampled candidates must be chosen independently of the context and of the true labels.
Args
true_classes A Tensor of type int64. A batch_size * num_true matrix, in which each row contains the IDs of the num_true target_classes in the corresponding original label.
num_true An int that is >= 1. Number of true labels per context.
num_sampled An int that is >= 1. Number of candidates to randomly sample.
unique A bool. If unique is true, we sample with rejection, so that all sampled candidates in a batch are unique. This requires some approximation to estimate the post-rejection sampling probabilities.
range_max An int that is >= 1. The sampler will sample integers from the interval [0, range_max).
seed An optional int. Defaults to 0. If either seed or seed2 are set to be non-zero, the random number generator is seeded by the given seed. Otherwise, it is seeded by a random seed.
seed2 An optional int. Defaults to 0. An second seed to avoid seed collision.
name A name for the operation (optional).
Returns A tuple of Tensor objects (sampled_candidates, true_expected_count, sampled_expected_count). sampled_candidates A Tensor of type int64.
true_expected_count A Tensor of type float32.
sampled_expected_count A Tensor of type float32. | tensorflow.raw_ops.learnedunigramcandidatesampler |
tf.raw_ops.LeftShift Elementwise computes the bitwise left-shift of x and y. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.LeftShift
tf.raw_ops.LeftShift(
x, y, name=None
)
If y is negative, or greater than or equal to the width of x in bits the result is implementation defined. Example: import tensorflow as tf
from tensorflow.python.ops import bitwise_ops
import numpy as np
dtype_list = [tf.int8, tf.int16, tf.int32, tf.int64]
for dtype in dtype_list:
lhs = tf.constant([-1, -5, -3, -14], dtype=dtype)
rhs = tf.constant([5, 0, 7, 11], dtype=dtype)
left_shift_result = bitwise_ops.left_shift(lhs, rhs)
print(left_shift_result)
# This will print:
# tf.Tensor([ -32 -5 -128 0], shape=(4,), dtype=int8)
# tf.Tensor([ -32 -5 -384 -28672], shape=(4,), dtype=int16)
# tf.Tensor([ -32 -5 -384 -28672], shape=(4,), dtype=int32)
# tf.Tensor([ -32 -5 -384 -28672], shape=(4,), dtype=int64)
lhs = np.array([-2, 64, 101, 32], dtype=np.int8)
rhs = np.array([-1, -5, -3, -14], dtype=np.int8)
bitwise_ops.left_shift(lhs, rhs)
# <tf.Tensor: shape=(4,), dtype=int8, numpy=array([ -2, 64, 101, 32], dtype=int8)>
Args
x A Tensor. Must be one of the following types: int8, int16, int32, int64, uint8, uint16, uint32, uint64.
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.leftshift |
tf.raw_ops.LegacyParallelInterleaveDatasetV2 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.LegacyParallelInterleaveDatasetV2
tf.raw_ops.LegacyParallelInterleaveDatasetV2(
input_dataset, other_arguments, cycle_length, block_length,
buffer_output_elements, prefetch_input_elements, f, output_types, output_shapes,
deterministic='default', 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.
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.
deterministic An optional string. Defaults to "default".
name A name for the operation (optional).
Returns A Tensor of type variant. | tensorflow.raw_ops.legacyparallelinterleavedatasetv2 |
tf.raw_ops.Less 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.Less
tf.raw_ops.Less(
x, y, name=None
)
Note: math.less supports broadcasting. More about broadcasting here
Example: x = tf.constant([5, 4, 6])
y = tf.constant([5])
tf.math.less(x, y) ==> [False, True, False]
x = tf.constant([5, 4, 6])
y = tf.constant([5, 6, 7])
tf.math.less(x, y) ==> [False, True, True]
Args
x A Tensor. Must be one of the following types: float32, float64, int32, uint8, int16, int8, int64, bfloat16, uint16, half, uint32, uint64.
y A Tensor. Must have the same type as x.
name A name for the operation (optional).
Returns A Tensor of type bool. | tensorflow.raw_ops.less |
tf.raw_ops.LessEqual 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.LessEqual
tf.raw_ops.LessEqual(
x, y, name=None
)
Note: math.less_equal supports broadcasting. More about broadcasting here
Example: x = tf.constant([5, 4, 6])
y = tf.constant([5])
tf.math.less_equal(x, y) ==> [True, True, False]
x = tf.constant([5, 4, 6])
y = tf.constant([5, 6, 6])
tf.math.less_equal(x, y) ==> [True, True, True]
Args
x A Tensor. Must be one of the following types: float32, float64, int32, uint8, int16, int8, int64, bfloat16, uint16, half, uint32, uint64.
y A Tensor. Must have the same type as x.
name A name for the operation (optional).
Returns A Tensor of type bool. | tensorflow.raw_ops.lessequal |
tf.raw_ops.Lgamma Computes the log of the absolute value of Gamma(x) element-wise. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.Lgamma
tf.raw_ops.Lgamma(
x, name=None
)
For positive numbers, this function computes log((input - 1)!) for every element in the tensor. lgamma(5) = log((5-1)!) = log(4!) = log(24) = 3.1780539 Example: x = tf.constant([0, 0.5, 1, 4.5, -4, -5.6])
tf.math.lgamma(x) ==> [inf, 0.5723649, 0., 2.4537368, inf, -4.6477685]
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.lgamma |
tf.raw_ops.LinSpace Generates values in an interval. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.LinSpace
tf.raw_ops.LinSpace(
start, stop, num, name=None
)
A sequence of num evenly-spaced values are generated beginning at start. If num > 1, the values in the sequence increase by stop - start / num - 1, so that the last one is exactly stop. For example: tf.linspace(10.0, 12.0, 3, name="linspace") => [ 10.0 11.0 12.0]
Args
start A Tensor. Must be one of the following types: bfloat16, half, float32, float64. 0-D tensor. First entry in the range.
stop A Tensor. Must have the same type as start. 0-D tensor. Last entry in the range.
num A Tensor. Must be one of the following types: int32, int64. 0-D tensor. Number of values to generate.
name A name for the operation (optional).
Returns A Tensor. Has the same type as start. | tensorflow.raw_ops.linspace |
tf.raw_ops.ListDiff Computes the difference between two lists of numbers or strings. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.ListDiff
tf.raw_ops.ListDiff(
x, y, out_idx=tf.dtypes.int32, name=None
)
Given a list x and a list y, this operation returns a list out that represents all values that are in x but not in y. The returned list out is sorted in the same order that the numbers appear in x (duplicates are preserved). This operation also returns a list idx that represents the position of each out element in x. In other words: out[i] = x[idx[i]] for i in [0, 1, ..., len(out) - 1] For example, given this input: x = [1, 2, 3, 4, 5, 6]
y = [1, 3, 5]
This operation would return: out ==> [2, 4, 6]
idx ==> [1, 3, 5]
Args
x A Tensor. 1-D. Values to keep.
y A Tensor. Must have the same type as x. 1-D. Values to remove.
out_idx An optional tf.DType from: tf.int32, tf.int64. Defaults to tf.int32.
name A name for the operation (optional).
Returns A tuple of Tensor objects (out, idx). out A Tensor. Has the same type as x.
idx A Tensor of type out_idx. | tensorflow.raw_ops.listdiff |
tf.raw_ops.LMDBDataset Creates a dataset that emits the key-value pairs in one or more LMDB files. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.LMDBDataset
tf.raw_ops.LMDBDataset(
filenames, output_types, output_shapes, name=None
)
The Lightning Memory-Mapped Database Manager, or LMDB, is an embedded binary key-value database. This dataset can read the contents of LMDB database files, the names of which generally have the .mdb suffix. Each output element consists of a key-value pair represented as a pair of scalar string Tensors, where the first Tensor contains the key and the second Tensor contains the value. LMDB uses different file formats on big- and little-endian machines. LMDBDataset can only read files in the format of the host machine.
Args
filenames A Tensor of type string. A scalar or a vector containing the name(s) of the binary file(s) to be read.
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.lmdbdataset |
tf.raw_ops.LMDBReader A Reader that outputs the records from a LMDB file. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.LMDBReader
tf.raw_ops.LMDBReader(
container='', shared_name='', name=None
)
Args
container An optional string. Defaults to "". If non-empty, this reader is placed in the given container. Otherwise, a default container is used.
shared_name An optional string. Defaults to "". If non-empty, this reader is named in the given bucket with this shared_name. Otherwise, the node name is used instead.
name A name for the operation (optional).
Returns A Tensor of type mutable string. | tensorflow.raw_ops.lmdbreader |
tf.raw_ops.LoadAndRemapMatrix Loads a 2-D (matrix) Tensor with name old_tensor_name from the checkpoint View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.LoadAndRemapMatrix
tf.raw_ops.LoadAndRemapMatrix(
ckpt_path, old_tensor_name, row_remapping, col_remapping, initializing_values,
num_rows, num_cols, max_rows_in_memory=-1, name=None
)
at ckpt_path and potentially reorders its rows and columns using the specified remappings. Most users should use one of the wrapper initializers (such as tf.contrib.framework.load_and_remap_matrix_initializer) instead of this function directly. The remappings are 1-D tensors with the following properties:
row_remapping must have exactly num_rows entries. Row i of the output matrix will be initialized from the row corresponding to index row_remapping[i] in the old Tensor from the checkpoint.
col_remapping must have either 0 entries (indicating that no column reordering is needed) or num_cols entries. If specified, column j of the output matrix will be initialized from the column corresponding to index col_remapping[j] in the old Tensor from the checkpoint. A value of -1 in either of the remappings signifies a "missing" entry. In that case, values from the initializing_values tensor will be used to fill that missing row or column. If row_remapping has r missing entries and col_remapping has c missing entries, then the following condition must be true: (r * num_cols) + (c * num_rows) - (r * c) == len(initializing_values) The remapping tensors can be generated using the GenerateVocabRemapping op. As an example, with row_remapping = [1, 0, -1], col_remapping = [0, 2, -1], initializing_values = [0.5, -0.5, 0.25, -0.25, 42], and w(i, j) representing the value from row i, column j of the old tensor in the checkpoint, the output matrix will look like the following: [[w(1, 0), w(1, 2), 0.5], [w(0, 0), w(0, 2), -0.5], [0.25, -0.25, 42]]
Args
ckpt_path A Tensor of type string. Path to the TensorFlow checkpoint (version 2, TensorBundle) from which the old matrix Tensor will be loaded.
old_tensor_name A Tensor of type string. Name of the 2-D Tensor to load from checkpoint.
row_remapping A Tensor of type int64. An int Tensor of row remappings (generally created by generate_vocab_remapping). Even if no row remapping is needed, this must still be an index-valued Tensor (e.g. [0, 1, 2, ...]), or a shifted index-valued Tensor (e.g. [8, 9, 10, ...], for partitioned Variables).
col_remapping A Tensor of type int64. An int Tensor of column remappings (generally created by generate_vocab_remapping). May be a size-0 Tensor if only row remapping is to be done (e.g. column ordering is the same).
initializing_values A Tensor of type float32. A float Tensor containing values to fill in for cells in the output matrix that are not loaded from the checkpoint. Length must be exactly the same as the number of missing / new cells.
num_rows An int that is >= 0. Number of rows (length of the 1st dimension) in the output matrix.
num_cols An int that is >= 1. Number of columns (length of the 2nd dimension) in the output matrix.
max_rows_in_memory An optional int. Defaults to -1. The maximum number of rows to load from the checkpoint at once. If less than or equal to 0, the entire matrix will be loaded into memory. Setting this arg trades increased disk reads for lower memory usage.
name A name for the operation (optional).
Returns A Tensor of type float32. | tensorflow.raw_ops.loadandremapmatrix |
tf.raw_ops.LoadDataset View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.LoadDataset
tf.raw_ops.LoadDataset(
path, reader_func_other_args, output_types, output_shapes, reader_func,
compression='', name=None
)
Args
path A Tensor of type string.
reader_func_other_args A list of Tensor objects.
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.
reader_func A function decorated with @Defun.
compression An optional string. Defaults to "".
name A name for the operation (optional).
Returns A Tensor of type variant. | tensorflow.raw_ops.loaddataset |
tf.raw_ops.LoadTPUEmbeddingAdadeltaParameters Load Adadelta embedding parameters. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.LoadTPUEmbeddingAdadeltaParameters
tf.raw_ops.LoadTPUEmbeddingAdadeltaParameters(
parameters, accumulators, updates, num_shards, shard_id, table_id=-1,
table_name='', config='', name=None
)
An op that loads optimization parameters into HBM for embedding. Must be preceded by a ConfigureTPUEmbeddingHost op that sets up the correct embedding table configuration. For example, this op is used to install parameters that are loaded from a checkpoint before a training loop is executed.
Args
parameters A Tensor of type float32. Value of parameters used in the Adadelta optimization algorithm.
accumulators A Tensor of type float32. Value of accumulators used in the Adadelta optimization algorithm.
updates A Tensor of type float32. Value of updates used in the Adadelta optimization algorithm.
num_shards An int.
shard_id An int.
table_id An optional int. Defaults to -1.
table_name An optional string. Defaults to "".
config An optional string. Defaults to "".
name A name for the operation (optional).
Returns The created Operation. | tensorflow.raw_ops.loadtpuembeddingadadeltaparameters |
tf.raw_ops.LoadTPUEmbeddingAdadeltaParametersGradAccumDebug Load Adadelta parameters with debug support. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.LoadTPUEmbeddingAdadeltaParametersGradAccumDebug
tf.raw_ops.LoadTPUEmbeddingAdadeltaParametersGradAccumDebug(
parameters, accumulators, updates, gradient_accumulators, num_shards, shard_id,
table_id=-1, table_name='', config='', name=None
)
An op that loads optimization parameters into HBM for embedding. Must be preceded by a ConfigureTPUEmbeddingHost op that sets up the correct embedding table configuration. For example, this op is used to install parameters that are loaded from a checkpoint before a training loop is executed.
Args
parameters A Tensor of type float32. Value of parameters used in the Adadelta optimization algorithm.
accumulators A Tensor of type float32. Value of accumulators used in the Adadelta optimization algorithm.
updates A Tensor of type float32. Value of updates used in the Adadelta optimization algorithm.
gradient_accumulators A Tensor of type float32. Value of gradient_accumulators used in the Adadelta optimization algorithm.
num_shards An int.
shard_id An int.
table_id An optional int. Defaults to -1.
table_name An optional string. Defaults to "".
config An optional string. Defaults to "".
name A name for the operation (optional).
Returns The created Operation. | tensorflow.raw_ops.loadtpuembeddingadadeltaparametersgradaccumdebug |
tf.raw_ops.LoadTPUEmbeddingAdagradParameters Load Adagrad embedding parameters. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.LoadTPUEmbeddingAdagradParameters
tf.raw_ops.LoadTPUEmbeddingAdagradParameters(
parameters, accumulators, num_shards, shard_id, table_id=-1,
table_name='', config='', name=None
)
An op that loads optimization parameters into HBM for embedding. Must be preceded by a ConfigureTPUEmbeddingHost op that sets up the correct embedding table configuration. For example, this op is used to install parameters that are loaded from a checkpoint before a training loop is executed.
Args
parameters A Tensor of type float32. Value of parameters used in the Adagrad optimization algorithm.
accumulators A Tensor of type float32. Value of accumulators used in the Adagrad optimization algorithm.
num_shards An int.
shard_id An int.
table_id An optional int. Defaults to -1.
table_name An optional string. Defaults to "".
config An optional string. Defaults to "".
name A name for the operation (optional).
Returns The created Operation. | tensorflow.raw_ops.loadtpuembeddingadagradparameters |
tf.raw_ops.LoadTPUEmbeddingAdagradParametersGradAccumDebug Load Adagrad embedding parameters with debug support. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.LoadTPUEmbeddingAdagradParametersGradAccumDebug
tf.raw_ops.LoadTPUEmbeddingAdagradParametersGradAccumDebug(
parameters, accumulators, gradient_accumulators, num_shards, shard_id,
table_id=-1, table_name='', config='', name=None
)
An op that loads optimization parameters into HBM for embedding. Must be preceded by a ConfigureTPUEmbeddingHost op that sets up the correct embedding table configuration. For example, this op is used to install parameters that are loaded from a checkpoint before a training loop is executed.
Args
parameters A Tensor of type float32. Value of parameters used in the Adagrad optimization algorithm.
accumulators A Tensor of type float32. Value of accumulators used in the Adagrad optimization algorithm.
gradient_accumulators A Tensor of type float32. Value of gradient_accumulators used in the Adagrad optimization algorithm.
num_shards An int.
shard_id An int.
table_id An optional int. Defaults to -1.
table_name An optional string. Defaults to "".
config An optional string. Defaults to "".
name A name for the operation (optional).
Returns The created Operation. | tensorflow.raw_ops.loadtpuembeddingadagradparametersgradaccumdebug |
tf.raw_ops.LoadTPUEmbeddingADAMParameters Load ADAM embedding parameters. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.LoadTPUEmbeddingADAMParameters
tf.raw_ops.LoadTPUEmbeddingADAMParameters(
parameters, momenta, velocities, num_shards, shard_id, table_id=-1,
table_name='', config='', name=None
)
An op that loads optimization parameters into HBM for embedding. Must be preceded by a ConfigureTPUEmbeddingHost op that sets up the correct embedding table configuration. For example, this op is used to install parameters that are loaded from a checkpoint before a training loop is executed.
Args
parameters A Tensor of type float32. Value of parameters used in the ADAM optimization algorithm.
momenta A Tensor of type float32. Value of momenta used in the ADAM optimization algorithm.
velocities A Tensor of type float32. Value of velocities used in the ADAM optimization algorithm.
num_shards An int.
shard_id An int.
table_id An optional int. Defaults to -1.
table_name An optional string. Defaults to "".
config An optional string. Defaults to "".
name A name for the operation (optional).
Returns The created Operation. | tensorflow.raw_ops.loadtpuembeddingadamparameters |
tf.raw_ops.LoadTPUEmbeddingADAMParametersGradAccumDebug Load ADAM embedding parameters with debug support. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.LoadTPUEmbeddingADAMParametersGradAccumDebug
tf.raw_ops.LoadTPUEmbeddingADAMParametersGradAccumDebug(
parameters, momenta, velocities, gradient_accumulators, num_shards, shard_id,
table_id=-1, table_name='', config='', name=None
)
An op that loads optimization parameters into HBM for embedding. Must be preceded by a ConfigureTPUEmbeddingHost op that sets up the correct embedding table configuration. For example, this op is used to install parameters that are loaded from a checkpoint before a training loop is executed.
Args
parameters A Tensor of type float32. Value of parameters used in the ADAM optimization algorithm.
momenta A Tensor of type float32. Value of momenta used in the ADAM optimization algorithm.
velocities A Tensor of type float32. Value of velocities used in the ADAM optimization algorithm.
gradient_accumulators A Tensor of type float32. Value of gradient_accumulators used in the ADAM optimization algorithm.
num_shards An int.
shard_id An int.
table_id An optional int. Defaults to -1.
table_name An optional string. Defaults to "".
config An optional string. Defaults to "".
name A name for the operation (optional).
Returns The created Operation. | tensorflow.raw_ops.loadtpuembeddingadamparametersgradaccumdebug |
tf.raw_ops.LoadTPUEmbeddingCenteredRMSPropParameters Load centered RMSProp embedding parameters. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.LoadTPUEmbeddingCenteredRMSPropParameters
tf.raw_ops.LoadTPUEmbeddingCenteredRMSPropParameters(
parameters, ms, mom, mg, num_shards, shard_id, table_id=-1,
table_name='', config='', name=None
)
An op that loads optimization parameters into HBM for embedding. Must be preceded by a ConfigureTPUEmbeddingHost op that sets up the correct embedding table configuration. For example, this op is used to install parameters that are loaded from a checkpoint before a training loop is executed.
Args
parameters A Tensor of type float32. Value of parameters used in the centered RMSProp optimization algorithm.
ms A Tensor of type float32. Value of ms used in the centered RMSProp optimization algorithm.
mom A Tensor of type float32. Value of mom used in the centered RMSProp optimization algorithm.
mg A Tensor of type float32. Value of mg used in the centered RMSProp optimization algorithm.
num_shards An int.
shard_id An int.
table_id An optional int. Defaults to -1.
table_name An optional string. Defaults to "".
config An optional string. Defaults to "".
name A name for the operation (optional).
Returns The created Operation. | tensorflow.raw_ops.loadtpuembeddingcenteredrmspropparameters |
tf.raw_ops.LoadTPUEmbeddingFTRLParameters Load FTRL embedding parameters. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.LoadTPUEmbeddingFTRLParameters
tf.raw_ops.LoadTPUEmbeddingFTRLParameters(
parameters, accumulators, linears, num_shards, shard_id, table_id=-1,
table_name='', config='', name=None
)
An op that loads optimization parameters into HBM for embedding. Must be preceded by a ConfigureTPUEmbeddingHost op that sets up the correct embedding table configuration. For example, this op is used to install parameters that are loaded from a checkpoint before a training loop is executed.
Args
parameters A Tensor of type float32. Value of parameters used in the FTRL optimization algorithm.
accumulators A Tensor of type float32. Value of accumulators used in the FTRL optimization algorithm.
linears A Tensor of type float32. Value of linears used in the FTRL optimization algorithm.
num_shards An int.
shard_id An int.
table_id An optional int. Defaults to -1.
table_name An optional string. Defaults to "".
config An optional string. Defaults to "".
name A name for the operation (optional).
Returns The created Operation. | tensorflow.raw_ops.loadtpuembeddingftrlparameters |
tf.raw_ops.LoadTPUEmbeddingFTRLParametersGradAccumDebug Load FTRL embedding parameters with debug support. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.LoadTPUEmbeddingFTRLParametersGradAccumDebug
tf.raw_ops.LoadTPUEmbeddingFTRLParametersGradAccumDebug(
parameters, accumulators, linears, gradient_accumulators, num_shards, shard_id,
table_id=-1, table_name='', config='', name=None
)
An op that loads optimization parameters into HBM for embedding. Must be preceded by a ConfigureTPUEmbeddingHost op that sets up the correct embedding table configuration. For example, this op is used to install parameters that are loaded from a checkpoint before a training loop is executed.
Args
parameters A Tensor of type float32. Value of parameters used in the FTRL optimization algorithm.
accumulators A Tensor of type float32. Value of accumulators used in the FTRL optimization algorithm.
linears A Tensor of type float32. Value of linears used in the FTRL optimization algorithm.
gradient_accumulators A Tensor of type float32. Value of gradient_accumulators used in the FTRL optimization algorithm.
num_shards An int.
shard_id An int.
table_id An optional int. Defaults to -1.
table_name An optional string. Defaults to "".
config An optional string. Defaults to "".
name A name for the operation (optional).
Returns The created Operation. | tensorflow.raw_ops.loadtpuembeddingftrlparametersgradaccumdebug |
tf.raw_ops.LoadTPUEmbeddingMDLAdagradLightParameters Load MDL Adagrad Light embedding parameters. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.LoadTPUEmbeddingMDLAdagradLightParameters
tf.raw_ops.LoadTPUEmbeddingMDLAdagradLightParameters(
parameters, accumulators, weights, benefits, num_shards, shard_id, table_id=-1,
table_name='', config='', name=None
)
An op that loads optimization parameters into HBM for embedding. Must be preceded by a ConfigureTPUEmbeddingHost op that sets up the correct embedding table configuration. For example, this op is used to install parameters that are loaded from a checkpoint before a training loop is executed.
Args
parameters A Tensor of type float32. Value of parameters used in the MDL Adagrad Light optimization algorithm.
accumulators A Tensor of type float32. Value of accumulators used in the MDL Adagrad Light optimization algorithm.
weights A Tensor of type float32. Value of weights used in the MDL Adagrad Light optimization algorithm.
benefits A Tensor of type float32. Value of benefits used in the MDL Adagrad Light optimization algorithm.
num_shards An int.
shard_id An int.
table_id An optional int. Defaults to -1.
table_name An optional string. Defaults to "".
config An optional string. Defaults to "".
name A name for the operation (optional).
Returns The created Operation. | tensorflow.raw_ops.loadtpuembeddingmdladagradlightparameters |
tf.raw_ops.LoadTPUEmbeddingMomentumParameters Load Momentum embedding parameters. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.LoadTPUEmbeddingMomentumParameters
tf.raw_ops.LoadTPUEmbeddingMomentumParameters(
parameters, momenta, num_shards, shard_id, table_id=-1, table_name='',
config='', name=None
)
An op that loads optimization parameters into HBM for embedding. Must be preceded by a ConfigureTPUEmbeddingHost op that sets up the correct embedding table configuration. For example, this op is used to install parameters that are loaded from a checkpoint before a training loop is executed.
Args
parameters A Tensor of type float32. Value of parameters used in the Momentum optimization algorithm.
momenta A Tensor of type float32. Value of momenta used in the Momentum optimization algorithm.
num_shards An int.
shard_id An int.
table_id An optional int. Defaults to -1.
table_name An optional string. Defaults to "".
config An optional string. Defaults to "".
name A name for the operation (optional).
Returns The created Operation. | tensorflow.raw_ops.loadtpuembeddingmomentumparameters |
tf.raw_ops.LoadTPUEmbeddingMomentumParametersGradAccumDebug Load Momentum embedding parameters with debug support. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.LoadTPUEmbeddingMomentumParametersGradAccumDebug
tf.raw_ops.LoadTPUEmbeddingMomentumParametersGradAccumDebug(
parameters, momenta, gradient_accumulators, num_shards, shard_id, table_id=-1,
table_name='', config='', name=None
)
An op that loads optimization parameters into HBM for embedding. Must be preceded by a ConfigureTPUEmbeddingHost op that sets up the correct embedding table configuration. For example, this op is used to install parameters that are loaded from a checkpoint before a training loop is executed.
Args
parameters A Tensor of type float32. Value of parameters used in the Momentum optimization algorithm.
momenta A Tensor of type float32. Value of momenta used in the Momentum optimization algorithm.
gradient_accumulators A Tensor of type float32. Value of gradient_accumulators used in the Momentum optimization algorithm.
num_shards An int.
shard_id An int.
table_id An optional int. Defaults to -1.
table_name An optional string. Defaults to "".
config An optional string. Defaults to "".
name A name for the operation (optional).
Returns The created Operation. | tensorflow.raw_ops.loadtpuembeddingmomentumparametersgradaccumdebug |
tf.raw_ops.LoadTPUEmbeddingProximalAdagradParameters Load proximal Adagrad embedding parameters. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.LoadTPUEmbeddingProximalAdagradParameters
tf.raw_ops.LoadTPUEmbeddingProximalAdagradParameters(
parameters, accumulators, num_shards, shard_id, table_id=-1,
table_name='', config='', name=None
)
An op that loads optimization parameters into HBM for embedding. Must be preceded by a ConfigureTPUEmbeddingHost op that sets up the correct embedding table configuration. For example, this op is used to install parameters that are loaded from a checkpoint before a training loop is executed.
Args
parameters A Tensor of type float32. Value of parameters used in the proximal Adagrad optimization algorithm.
accumulators A Tensor of type float32. Value of accumulators used in the proximal Adagrad optimization algorithm.
num_shards An int.
shard_id An int.
table_id An optional int. Defaults to -1.
table_name An optional string. Defaults to "".
config An optional string. Defaults to "".
name A name for the operation (optional).
Returns The created Operation. | tensorflow.raw_ops.loadtpuembeddingproximaladagradparameters |
tf.raw_ops.LoadTPUEmbeddingProximalAdagradParametersGradAccumDebug Load proximal Adagrad embedding parameters with debug support. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.LoadTPUEmbeddingProximalAdagradParametersGradAccumDebug
tf.raw_ops.LoadTPUEmbeddingProximalAdagradParametersGradAccumDebug(
parameters, accumulators, gradient_accumulators, num_shards, shard_id,
table_id=-1, table_name='', config='', name=None
)
An op that loads optimization parameters into HBM for embedding. Must be preceded by a ConfigureTPUEmbeddingHost op that sets up the correct embedding table configuration. For example, this op is used to install parameters that are loaded from a checkpoint before a training loop is executed.
Args
parameters A Tensor of type float32. Value of parameters used in the proximal Adagrad optimization algorithm.
accumulators A Tensor of type float32. Value of accumulators used in the proximal Adagrad optimization algorithm.
gradient_accumulators A Tensor of type float32. Value of gradient_accumulators used in the proximal Adagrad optimization algorithm.
num_shards An int.
shard_id An int.
table_id An optional int. Defaults to -1.
table_name An optional string. Defaults to "".
config An optional string. Defaults to "".
name A name for the operation (optional).
Returns The created Operation. | tensorflow.raw_ops.loadtpuembeddingproximaladagradparametersgradaccumdebug |
tf.raw_ops.LoadTPUEmbeddingProximalYogiParameters View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.LoadTPUEmbeddingProximalYogiParameters
tf.raw_ops.LoadTPUEmbeddingProximalYogiParameters(
parameters, v, m, num_shards, shard_id, table_id=-1, table_name='',
config='', name=None
)
Args
parameters A Tensor of type float32.
v A Tensor of type float32.
m A Tensor of type float32.
num_shards An int.
shard_id An int.
table_id An optional int. Defaults to -1.
table_name An optional string. Defaults to "".
config An optional string. Defaults to "".
name A name for the operation (optional).
Returns The created Operation. | tensorflow.raw_ops.loadtpuembeddingproximalyogiparameters |
tf.raw_ops.LoadTPUEmbeddingProximalYogiParametersGradAccumDebug View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.LoadTPUEmbeddingProximalYogiParametersGradAccumDebug
tf.raw_ops.LoadTPUEmbeddingProximalYogiParametersGradAccumDebug(
parameters, v, m, gradient_accumulators, num_shards, shard_id, table_id=-1,
table_name='', config='', name=None
)
Args
parameters A Tensor of type float32.
v A Tensor of type float32.
m A Tensor of type float32.
gradient_accumulators A Tensor of type float32.
num_shards An int.
shard_id An int.
table_id An optional int. Defaults to -1.
table_name An optional string. Defaults to "".
config An optional string. Defaults to "".
name A name for the operation (optional).
Returns The created Operation. | tensorflow.raw_ops.loadtpuembeddingproximalyogiparametersgradaccumdebug |
tf.raw_ops.LoadTPUEmbeddingRMSPropParameters Load RMSProp embedding parameters. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.LoadTPUEmbeddingRMSPropParameters
tf.raw_ops.LoadTPUEmbeddingRMSPropParameters(
parameters, ms, mom, num_shards, shard_id, table_id=-1, table_name='',
config='', name=None
)
An op that loads optimization parameters into HBM for embedding. Must be preceded by a ConfigureTPUEmbeddingHost op that sets up the correct embedding table configuration. For example, this op is used to install parameters that are loaded from a checkpoint before a training loop is executed.
Args
parameters A Tensor of type float32. Value of parameters used in the RMSProp optimization algorithm.
ms A Tensor of type float32. Value of ms used in the RMSProp optimization algorithm.
mom A Tensor of type float32. Value of mom used in the RMSProp optimization algorithm.
num_shards An int.
shard_id An int.
table_id An optional int. Defaults to -1.
table_name An optional string. Defaults to "".
config An optional string. Defaults to "".
name A name for the operation (optional).
Returns The created Operation. | tensorflow.raw_ops.loadtpuembeddingrmspropparameters |
tf.raw_ops.LoadTPUEmbeddingRMSPropParametersGradAccumDebug Load RMSProp embedding parameters with debug support. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.LoadTPUEmbeddingRMSPropParametersGradAccumDebug
tf.raw_ops.LoadTPUEmbeddingRMSPropParametersGradAccumDebug(
parameters, ms, mom, gradient_accumulators, num_shards, shard_id, table_id=-1,
table_name='', config='', name=None
)
An op that loads optimization parameters into HBM for embedding. Must be preceded by a ConfigureTPUEmbeddingHost op that sets up the correct embedding table configuration. For example, this op is used to install parameters that are loaded from a checkpoint before a training loop is executed.
Args
parameters A Tensor of type float32. Value of parameters used in the RMSProp optimization algorithm.
ms A Tensor of type float32. Value of ms used in the RMSProp optimization algorithm.
mom A Tensor of type float32. Value of mom used in the RMSProp optimization algorithm.
gradient_accumulators A Tensor of type float32. Value of gradient_accumulators used in the RMSProp optimization algorithm.
num_shards An int.
shard_id An int.
table_id An optional int. Defaults to -1.
table_name An optional string. Defaults to "".
config An optional string. Defaults to "".
name A name for the operation (optional).
Returns The created Operation. | tensorflow.raw_ops.loadtpuembeddingrmspropparametersgradaccumdebug |
tf.raw_ops.LoadTPUEmbeddingStochasticGradientDescentParameters Load SGD embedding parameters. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.LoadTPUEmbeddingStochasticGradientDescentParameters
tf.raw_ops.LoadTPUEmbeddingStochasticGradientDescentParameters(
parameters, num_shards, shard_id, table_id=-1, table_name='',
config='', name=None
)
An op that loads optimization parameters into HBM for embedding. Must be preceded by a ConfigureTPUEmbeddingHost op that sets up the correct embedding table configuration. For example, this op is used to install parameters that are loaded from a checkpoint before a training loop is executed.
Args
parameters A Tensor of type float32. Value of parameters used in the stochastic gradient descent optimization algorithm.
num_shards An int.
shard_id An int.
table_id An optional int. Defaults to -1.
table_name An optional string. Defaults to "".
config An optional string. Defaults to "".
name A name for the operation (optional).
Returns The created Operation. | tensorflow.raw_ops.loadtpuembeddingstochasticgradientdescentparameters |
tf.raw_ops.LoadTPUEmbeddingStochasticGradientDescentParametersGradAccumDebug Load SGD embedding parameters. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.LoadTPUEmbeddingStochasticGradientDescentParametersGradAccumDebug
tf.raw_ops.LoadTPUEmbeddingStochasticGradientDescentParametersGradAccumDebug(
parameters, gradient_accumulators, num_shards, shard_id, table_id=-1,
table_name='', config='', name=None
)
An op that loads optimization parameters into HBM for embedding. Must be preceded by a ConfigureTPUEmbeddingHost op that sets up the correct embedding table configuration. For example, this op is used to install parameters that are loaded from a checkpoint before a training loop is executed.
Args
parameters A Tensor of type float32. Value of parameters used in the stochastic gradient descent optimization algorithm.
gradient_accumulators A Tensor of type float32. Value of gradient_accumulators used in the Adadelta optimization algorithm.
num_shards An int.
shard_id An int.
table_id An optional int. Defaults to -1.
table_name An optional string. Defaults to "".
config An optional string. Defaults to "".
name A name for the operation (optional).
Returns The created Operation. | tensorflow.raw_ops.loadtpuembeddingstochasticgradientdescentparametersgradaccumdebug |
tf.raw_ops.Log Computes natural logarithm of x element-wise. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.Log
tf.raw_ops.Log(
x, name=None
)
I.e., \(y = \log_e x\). Example: x = tf.constant([0, 0.5, 1, 5]) tf.math.log(x) See: https://en.wikipedia.org/wiki/Logarithm
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.log |
tf.raw_ops.Log1p Computes natural logarithm of (1 + x) element-wise. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.Log1p
tf.raw_ops.Log1p(
x, name=None
)
I.e., \(y = \log_e (1 + x)\). Example:
x = tf.constant([0, 0.5, 1, 5])
tf.math.log1p(x)
<tf.Tensor: shape=(4,), dtype=float32, numpy=array([0. , 0.4054651, 0.6931472, 1.7917595], dtype=float32)>
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.log1p |
tf.raw_ops.LogicalAnd Returns the truth value of x AND y element-wise. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.LogicalAnd
tf.raw_ops.LogicalAnd(
x, y, name=None
)
Note: LogicalAnd supports broadcasting. More about broadcasting here
Args
x A Tensor of type bool.
y A Tensor of type bool.
name A name for the operation (optional).
Returns A Tensor of type bool. | tensorflow.raw_ops.logicaland |
tf.raw_ops.LogicalNot Returns the truth value of NOT x element-wise. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.LogicalNot
tf.raw_ops.LogicalNot(
x, name=None
)
Example:
tf.math.logical_not(tf.constant([True, False]))
<tf.Tensor: shape=(2,), dtype=bool, numpy=array([False, True])>
Args
x A Tensor of type bool. A Tensor of type bool.
name A name for the operation (optional).
Returns A Tensor of type bool. | tensorflow.raw_ops.logicalnot |
tf.raw_ops.LogicalOr Returns the truth value of x OR y element-wise. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.LogicalOr
tf.raw_ops.LogicalOr(
x, y, name=None
)
Note: math.logical_or supports broadcasting. More about broadcasting here
Args
x A Tensor of type bool.
y A Tensor of type bool.
name A name for the operation (optional).
Returns A Tensor of type bool. | tensorflow.raw_ops.logicalor |
tf.raw_ops.LogMatrixDeterminant Computes the sign and the log of the absolute value of the determinant of View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.LogMatrixDeterminant
tf.raw_ops.LogMatrixDeterminant(
input, name=None
)
one or more square matrices. The input is a tensor of shape [N, M, M] whose inner-most 2 dimensions form square matrices. The outputs are two tensors containing the signs and absolute values of the log determinants for all N input submatrices [..., :, :] such that determinant = sign*exp(log_abs_determinant). The log_abs_determinant is computed as det(P)*sum(log(diag(LU))) where LU is the LU decomposition of the input and P is the corresponding permutation matrix.
Args
input A Tensor. Must be one of the following types: half, float32, float64, complex64, complex128. Shape is [N, M, M].
name A name for the operation (optional).
Returns A tuple of Tensor objects (sign, log_abs_determinant). sign A Tensor. Has the same type as input.
log_abs_determinant A Tensor. Has the same type as input. | tensorflow.raw_ops.logmatrixdeterminant |
tf.raw_ops.LogSoftmax Computes log softmax activations. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.LogSoftmax
tf.raw_ops.LogSoftmax(
logits, name=None
)
For each batch i and class j we have logsoftmax[i, j] = logits[i, j] - log(sum(exp(logits[i])))
Args
logits A Tensor. Must be one of the following types: half, bfloat16, float32, float64. 2-D with shape [batch_size, num_classes].
name A name for the operation (optional).
Returns A Tensor. Has the same type as logits. | tensorflow.raw_ops.logsoftmax |
tf.raw_ops.LogUniformCandidateSampler Generates labels for candidate sampling with a log-uniform distribution. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.LogUniformCandidateSampler
tf.raw_ops.LogUniformCandidateSampler(
true_classes, num_true, num_sampled, unique, range_max, seed=0, seed2=0,
name=None
)
See explanations of candidate sampling and the data formats at go/candidate-sampling. For each batch, this op picks a single set of sampled candidate labels. The advantages of sampling candidates per-batch are simplicity and the possibility of efficient dense matrix multiplication. The disadvantage is that the sampled candidates must be chosen independently of the context and of the true labels.
Args
true_classes A Tensor of type int64. A batch_size * num_true matrix, in which each row contains the IDs of the num_true target_classes in the corresponding original label.
num_true An int that is >= 1. Number of true labels per context.
num_sampled An int that is >= 1. Number of candidates to randomly sample.
unique A bool. If unique is true, we sample with rejection, so that all sampled candidates in a batch are unique. This requires some approximation to estimate the post-rejection sampling probabilities.
range_max An int that is >= 1. The sampler will sample integers from the interval [0, range_max).
seed An optional int. Defaults to 0. If either seed or seed2 are set to be non-zero, the random number generator is seeded by the given seed. Otherwise, it is seeded by a random seed.
seed2 An optional int. Defaults to 0. An second seed to avoid seed collision.
name A name for the operation (optional).
Returns A tuple of Tensor objects (sampled_candidates, true_expected_count, sampled_expected_count). sampled_candidates A Tensor of type int64.
true_expected_count A Tensor of type float32.
sampled_expected_count A Tensor of type float32. | tensorflow.raw_ops.loguniformcandidatesampler |
tf.raw_ops.LookupTableExport Outputs all keys and values in the table. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.LookupTableExport
tf.raw_ops.LookupTableExport(
table_handle, Tkeys, Tvalues, name=None
)
Args
table_handle A Tensor of type mutable string. Handle to the table.
Tkeys A tf.DType.
Tvalues A tf.DType.
name A name for the operation (optional).
Returns A tuple of Tensor objects (keys, values). keys A Tensor of type Tkeys.
values A Tensor of type Tvalues. | tensorflow.raw_ops.lookuptableexport |
tf.raw_ops.LookupTableExportV2 Outputs all keys and values in the table. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.LookupTableExportV2
tf.raw_ops.LookupTableExportV2(
table_handle, Tkeys, Tvalues, name=None
)
Args
table_handle A Tensor of type resource. Handle to the table.
Tkeys A tf.DType.
Tvalues A tf.DType.
name A name for the operation (optional).
Returns A tuple of Tensor objects (keys, values). keys A Tensor of type Tkeys.
values A Tensor of type Tvalues. | tensorflow.raw_ops.lookuptableexportv2 |
tf.raw_ops.LookupTableFind Looks up keys in a table, outputs the corresponding values. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.LookupTableFind
tf.raw_ops.LookupTableFind(
table_handle, keys, default_value, name=None
)
The tensor keys must of the same type as the keys of the table. The output values is of the type of the table values. The scalar default_value is the value output for keys not present in the table. It must also be of the same type as the table values.
Args
table_handle A Tensor of type mutable string. Handle to the table.
keys A Tensor. Any shape. Keys to look up.
default_value A Tensor.
name A name for the operation (optional).
Returns A Tensor. Has the same type as default_value. | tensorflow.raw_ops.lookuptablefind |
tf.raw_ops.LookupTableFindV2 Looks up keys in a table, outputs the corresponding values. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.LookupTableFindV2
tf.raw_ops.LookupTableFindV2(
table_handle, keys, default_value, name=None
)
The tensor keys must of the same type as the keys of the table. The output values is of the type of the table values. The scalar default_value is the value output for keys not present in the table. It must also be of the same type as the table values.
Args
table_handle A Tensor of type resource. Handle to the table.
keys A Tensor. Any shape. Keys to look up.
default_value A Tensor.
name A name for the operation (optional).
Returns A Tensor. Has the same type as default_value. | tensorflow.raw_ops.lookuptablefindv2 |
tf.raw_ops.LookupTableImport Replaces the contents of the table with the specified keys and values. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.LookupTableImport
tf.raw_ops.LookupTableImport(
table_handle, keys, values, name=None
)
The tensor keys must be of the same type as the keys of the table. The tensor values must be of the type of the table values.
Args
table_handle A Tensor of type mutable string. Handle to the table.
keys A Tensor. Any shape. Keys to look up.
values A Tensor. Values to associate with keys.
name A name for the operation (optional).
Returns The created Operation. | tensorflow.raw_ops.lookuptableimport |
tf.raw_ops.LookupTableImportV2 Replaces the contents of the table with the specified keys and values. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.LookupTableImportV2
tf.raw_ops.LookupTableImportV2(
table_handle, keys, values, name=None
)
The tensor keys must be of the same type as the keys of the table. The tensor values must be of the type of the table values.
Args
table_handle A Tensor of type resource. Handle to the table.
keys A Tensor. Any shape. Keys to look up.
values A Tensor. Values to associate with keys.
name A name for the operation (optional).
Returns The created Operation. | tensorflow.raw_ops.lookuptableimportv2 |
tf.raw_ops.LookupTableInsert Updates the table to associates keys with values. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.LookupTableInsert
tf.raw_ops.LookupTableInsert(
table_handle, keys, values, name=None
)
The tensor keys must be of the same type as the keys of the table. The tensor values must be of the type of the table values.
Args
table_handle A Tensor of type mutable string. Handle to the table.
keys A Tensor. Any shape. Keys to look up.
values A Tensor. Values to associate with keys.
name A name for the operation (optional).
Returns The created Operation. | tensorflow.raw_ops.lookuptableinsert |
tf.raw_ops.LookupTableInsertV2 Updates the table to associates keys with values. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.LookupTableInsertV2
tf.raw_ops.LookupTableInsertV2(
table_handle, keys, values, name=None
)
The tensor keys must be of the same type as the keys of the table. The tensor values must be of the type of the table values.
Args
table_handle A Tensor of type resource. Handle to the table.
keys A Tensor. Any shape. Keys to look up.
values A Tensor. Values to associate with keys.
name A name for the operation (optional).
Returns The created Operation. | tensorflow.raw_ops.lookuptableinsertv2 |
tf.raw_ops.LookupTableRemoveV2 Removes keys and its associated values from a table. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.LookupTableRemoveV2
tf.raw_ops.LookupTableRemoveV2(
table_handle, keys, name=None
)
The tensor keys must of the same type as the keys of the table. Keys not already in the table are silently ignored.
Args
table_handle A Tensor of type resource. Handle to the table.
keys A Tensor. Any shape. Keys of the elements to remove.
name A name for the operation (optional).
Returns The created Operation. | tensorflow.raw_ops.lookuptableremovev2 |
tf.raw_ops.LookupTableSize Computes the number of elements in the given table. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.LookupTableSize
tf.raw_ops.LookupTableSize(
table_handle, name=None
)
Args
table_handle A Tensor of type mutable string. Handle to the table.
name A name for the operation (optional).
Returns A Tensor of type int64. | tensorflow.raw_ops.lookuptablesize |
tf.raw_ops.LookupTableSizeV2 Computes the number of elements in the given table. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.LookupTableSizeV2
tf.raw_ops.LookupTableSizeV2(
table_handle, name=None
)
Args
table_handle A Tensor of type resource. Handle to the table.
name A name for the operation (optional).
Returns A Tensor of type int64. | tensorflow.raw_ops.lookuptablesizev2 |
tf.raw_ops.LoopCond Forwards the input to the output. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.LoopCond
tf.raw_ops.LoopCond(
input, name=None
)
This operator represents the loop termination condition used by the "pivot" switches of a loop.
Args
input A Tensor of type bool. A boolean scalar, representing the branch predicate of the Switch op.
name A name for the operation (optional).
Returns A Tensor of type bool. | tensorflow.raw_ops.loopcond |
tf.raw_ops.LowerBound Applies lower_bound(sorted_search_values, values) along each row. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.LowerBound
tf.raw_ops.LowerBound(
sorted_inputs, values, out_type=tf.dtypes.int32, name=None
)
Each set of rows with the same index in (sorted_inputs, values) is treated independently. The resulting row is the equivalent of calling np.searchsorted(sorted_inputs, values, side='left'). The result is not a global index to the entire Tensor, but rather just the index in the last dimension. A 2-D example: sorted_sequence = [[0, 3, 9, 9, 10], [1, 2, 3, 4, 5]] values = [[2, 4, 9], [0, 2, 6]] result = LowerBound(sorted_sequence, values) result == [[1, 2, 2], [0, 1, 5]]
Args
sorted_inputs A Tensor. 2-D Tensor where each row is ordered.
values A Tensor. Must have the same type as sorted_inputs. 2-D Tensor with the same numbers of rows as sorted_search_values. Contains the values that will be searched for in sorted_search_values.
out_type An optional tf.DType from: tf.int32, tf.int64. Defaults to tf.int32.
name A name for the operation (optional).
Returns A Tensor of type out_type. | tensorflow.raw_ops.lowerbound |
tf.raw_ops.LRN Local Response Normalization. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.LRN
tf.raw_ops.LRN(
input, depth_radius=5, bias=1, alpha=1, beta=0.5, name=None
)
The 4-D input tensor is treated as a 3-D array of 1-D vectors (along the last dimension), and each vector is normalized independently. Within a given vector, each component is divided by the weighted, squared sum of inputs within depth_radius. In detail, sqr_sum[a, b, c, d] =
sum(input[a, b, c, d - depth_radius : d + depth_radius + 1] ** 2)
output = input / (bias + alpha * sqr_sum) ** beta
For details, see Krizhevsky et al., ImageNet classification with deep convolutional neural networks (NIPS 2012).
Args
input A Tensor. Must be one of the following types: half, bfloat16, float32. 4-D.
depth_radius An optional int. Defaults to 5. 0-D. Half-width of the 1-D normalization window.
bias An optional float. Defaults to 1. An offset (usually positive to avoid dividing by 0).
alpha An optional float. Defaults to 1. A scale factor, usually positive.
beta An optional float. Defaults to 0.5. An exponent.
name A name for the operation (optional).
Returns A Tensor. Has the same type as input. | tensorflow.raw_ops.lrn |
tf.raw_ops.LRNGrad Gradients for Local Response Normalization. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.LRNGrad
tf.raw_ops.LRNGrad(
input_grads, input_image, output_image, depth_radius=5, bias=1, alpha=1,
beta=0.5, name=None
)
Args
input_grads A Tensor. Must be one of the following types: half, bfloat16, float32. 4-D with shape [batch, height, width, channels].
input_image A Tensor. Must have the same type as input_grads. 4-D with shape [batch, height, width, channels].
output_image A Tensor. Must have the same type as input_grads. 4-D with shape [batch, height, width, channels].
depth_radius An optional int. Defaults to 5. A depth radius.
bias An optional float. Defaults to 1. An offset (usually > 0 to avoid dividing by 0).
alpha An optional float. Defaults to 1. A scale factor, usually positive.
beta An optional float. Defaults to 0.5. An exponent.
name A name for the operation (optional).
Returns A Tensor. Has the same type as input_grads. | tensorflow.raw_ops.lrngrad |
tf.raw_ops.LSTMBlockCell Computes the LSTM cell forward propagation for 1 time step. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.LSTMBlockCell
tf.raw_ops.LSTMBlockCell(
x, cs_prev, h_prev, w, wci, wcf, wco, b, forget_bias=1, cell_clip=3,
use_peephole=False, name=None
)
This implementation uses 1 weight matrix and 1 bias vector, and there's an optional peephole connection. This kernel op implements the following mathematical equations: xh = [x, h_prev]
[i, f, ci, o] = xh * w + b
f = f + forget_bias
if not use_peephole:
wci = wcf = wco = 0
i = sigmoid(cs_prev * wci + i)
f = sigmoid(cs_prev * wcf + f)
ci = tanh(ci)
cs = ci .* i + cs_prev .* f
cs = clip(cs, cell_clip)
o = sigmoid(cs * wco + o)
co = tanh(cs)
h = co .* o
Args
x A Tensor. Must be one of the following types: half, float32. The input to the LSTM cell, shape (batch_size, num_inputs).
cs_prev A Tensor. Must have the same type as x. Value of the cell state at previous time step.
h_prev A Tensor. Must have the same type as x. Output of the previous cell at previous time step.
w A Tensor. Must have the same type as x. The weight matrix.
wci A Tensor. Must have the same type as x. The weight matrix for input gate peephole connection.
wcf A Tensor. Must have the same type as x. The weight matrix for forget gate peephole connection.
wco A Tensor. Must have the same type as x. The weight matrix for output gate peephole connection.
b A Tensor. Must have the same type as x. The bias vector.
forget_bias An optional float. Defaults to 1. The forget gate bias.
cell_clip An optional float. Defaults to 3. Value to clip the 'cs' value to.
use_peephole An optional bool. Defaults to False. Whether to use peephole weights.
name A name for the operation (optional).
Returns A tuple of Tensor objects (i, cs, f, o, ci, co, h). i A Tensor. Has the same type as x.
cs A Tensor. Has the same type as x.
f A Tensor. Has the same type as x.
o A Tensor. Has the same type as x.
ci A Tensor. Has the same type as x.
co A Tensor. Has the same type as x.
h A Tensor. Has the same type as x. | tensorflow.raw_ops.lstmblockcell |
tf.raw_ops.LSTMBlockCellGrad Computes the LSTM cell backward propagation for 1 timestep. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.LSTMBlockCellGrad
tf.raw_ops.LSTMBlockCellGrad(
x, cs_prev, h_prev, w, wci, wcf, wco, b, i, cs, f, o, ci, co, cs_grad, h_grad,
use_peephole, name=None
)
This implementation is to be used in conjunction of LSTMBlockCell.
Args
x A Tensor. Must be one of the following types: half, float32. The input to the LSTM cell, shape (batch_size, num_inputs).
cs_prev A Tensor. Must have the same type as x. The previous cell state.
h_prev A Tensor. Must have the same type as x. The previous h state.
w A Tensor. Must have the same type as x. The weight matrix.
wci A Tensor. Must have the same type as x. The weight matrix for input gate peephole connection.
wcf A Tensor. Must have the same type as x. The weight matrix for forget gate peephole connection.
wco A Tensor. Must have the same type as x. The weight matrix for output gate peephole connection.
b A Tensor. Must have the same type as x. The bias vector.
i A Tensor. Must have the same type as x. The input gate.
cs A Tensor. Must have the same type as x. The cell state before the tanh.
f A Tensor. Must have the same type as x. The forget gate.
o A Tensor. Must have the same type as x. The output gate.
ci A Tensor. Must have the same type as x. The cell input.
co A Tensor. Must have the same type as x. The cell after the tanh.
cs_grad A Tensor. Must have the same type as x. The current gradient of cs.
h_grad A Tensor. Must have the same type as x. The gradient of h vector.
use_peephole A bool. Whether the cell uses peephole connections.
name A name for the operation (optional).
Returns A tuple of Tensor objects (cs_prev_grad, dicfo, wci_grad, wcf_grad, wco_grad). cs_prev_grad A Tensor. Has the same type as x.
dicfo A Tensor. Has the same type as x.
wci_grad A Tensor. Has the same type as x.
wcf_grad A Tensor. Has the same type as x.
wco_grad A Tensor. Has the same type as x. | tensorflow.raw_ops.lstmblockcellgrad |
tf.raw_ops.Lu Computes the LU decomposition of one or more square matrices. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.Lu
tf.raw_ops.Lu(
input, output_idx_type=tf.dtypes.int32, name=None
)
The input is a tensor of shape [..., M, M] whose inner-most 2 dimensions form square matrices. The input has to be invertible. The output consists of two tensors LU and P containing the LU decomposition of all input submatrices [..., :, :]. LU encodes the lower triangular and upper triangular factors. For each input submatrix of shape [M, M], L is a lower triangular matrix of shape [M, M] with unit diagonal whose entries correspond to the strictly lower triangular part of LU. U is a upper triangular matrix of shape [M, M] whose entries correspond to the upper triangular part, including the diagonal, of LU. P represents a permutation matrix encoded as a list of indices each between 0 and M-1, inclusive. If P_mat denotes the permutation matrix corresponding to P, then the L, U and P satisfies P_mat * input = L * U.
Args
input A Tensor. Must be one of the following types: float64, float32, half, complex64, complex128. A tensor of shape [..., M, M] whose inner-most 2 dimensions form matrices of size [M, M].
output_idx_type An optional tf.DType from: tf.int32, tf.int64. Defaults to tf.int32.
name A name for the operation (optional).
Returns A tuple of Tensor objects (lu, p). lu A Tensor. Has the same type as input.
p A Tensor of type output_idx_type. | tensorflow.raw_ops.lu |
tf.raw_ops.MakeIterator Makes a new iterator from the given dataset and stores it in iterator. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.MakeIterator
tf.raw_ops.MakeIterator(
dataset, iterator, name=None
)
This operation may be executed multiple times. Each execution will reset the iterator in iterator to the first element of dataset.
Args
dataset A Tensor of type variant.
iterator A Tensor of type resource.
name A name for the operation (optional).
Returns The created Operation. | tensorflow.raw_ops.makeiterator |
tf.raw_ops.MapAndBatchDataset 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.MapAndBatchDataset
tf.raw_ops.MapAndBatchDataset(
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.mapandbatchdataset |
tf.raw_ops.MapClear Op removes all elements in the underlying container. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.MapClear
tf.raw_ops.MapClear(
dtypes, capacity=0, memory_limit=0, container='',
shared_name='', name=None
)
Args
dtypes A list of tf.DTypes.
capacity An optional int that is >= 0. Defaults to 0.
memory_limit An optional int that is >= 0. Defaults to 0.
container An optional string. Defaults to "".
shared_name An optional string. Defaults to "".
name A name for the operation (optional).
Returns The created Operation. | tensorflow.raw_ops.mapclear |
tf.raw_ops.MapDataset 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.MapDataset
tf.raw_ops.MapDataset(
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.mapdataset |
tf.raw_ops.MapDefun Maps a function on the list of tensors unpacked from arguments on dimension 0. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.MapDefun
tf.raw_ops.MapDefun(
arguments, captured_inputs, output_types, output_shapes, f,
max_intra_op_parallelism=1, name=None
)
The function given by f is assumed to be stateless, and is executed concurrently on all the slices; up to batch_size (i.e. the size of the 0th dimension of each argument) functions will be scheduled at once. The max_intra_op_parallelism attr, which defaults to 1, can be used to limit the intra op parallelism. To limit inter-op parallelism, a user can set a private threadpool on the dataset using tf.data.Options's ThreadingOptions. Note that this op is not exposed to users directly, but is invoked in tf.data rewrites.
Args
arguments A list of Tensor objects. A list of tensors whose types are Targuments, corresponding to the inputs the function should be mapped over.
captured_inputs A list of Tensor objects. A list of tensors whose types are Tcaptured, corresponding to the captured inputs of the defun.
output_types A list of tf.DTypes that has length >= 1. A list of types.
output_shapes A list of shapes (each a tf.TensorShape or list of ints) that has length >= 1. A list of shapes.
f A function decorated with @Defun.
max_intra_op_parallelism An optional int. Defaults to 1.
name A name for the operation (optional).
Returns A list of Tensor objects of type output_types. | tensorflow.raw_ops.mapdefun |
tf.raw_ops.MapIncompleteSize Op returns the number of incomplete elements in the underlying container. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.MapIncompleteSize
tf.raw_ops.MapIncompleteSize(
dtypes, capacity=0, memory_limit=0, container='',
shared_name='', name=None
)
Args
dtypes A list of tf.DTypes.
capacity An optional int that is >= 0. Defaults to 0.
memory_limit An optional int that is >= 0. Defaults to 0.
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 int32. | tensorflow.raw_ops.mapincompletesize |
tf.raw_ops.MapPeek Op peeks at the values at the specified key. If the View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.MapPeek
tf.raw_ops.MapPeek(
key, indices, dtypes, capacity=0, memory_limit=0, container='',
shared_name='', name=None
)
underlying container does not contain this key this op will block until it does.
Args
key A Tensor of type int64.
indices A Tensor of type int32.
dtypes A list of tf.DTypes that has length >= 1.
capacity An optional int that is >= 0. Defaults to 0.
memory_limit An optional int that is >= 0. Defaults to 0.
container An optional string. Defaults to "".
shared_name An optional string. Defaults to "".
name A name for the operation (optional).
Returns A list of Tensor objects of type dtypes. | tensorflow.raw_ops.mappeek |
tf.raw_ops.MapSize Op returns the number of elements in the underlying container. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.MapSize
tf.raw_ops.MapSize(
dtypes, capacity=0, memory_limit=0, container='',
shared_name='', name=None
)
Args
dtypes A list of tf.DTypes.
capacity An optional int that is >= 0. Defaults to 0.
memory_limit An optional int that is >= 0. Defaults to 0.
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 int32. | tensorflow.raw_ops.mapsize |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.