doc_content
stringlengths 1
386k
| doc_id
stringlengths 5
188
|
---|---|
tf.raw_ops.QueueDequeueV2 Dequeues a tuple of one or more tensors from the given queue. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.QueueDequeueV2
tf.raw_ops.QueueDequeueV2(
handle, component_types, timeout_ms=-1, name=None
)
This operation has k outputs, where k is the number of components in the tuples stored in the given queue, and output i is the ith component of the dequeued tuple. N.B. If the queue is empty, this operation will block until an element has been dequeued (or 'timeout_ms' elapses, if specified).
Args
handle A Tensor of type resource. The handle to a queue.
component_types A list of tf.DTypes that has length >= 1. The type of each component in a tuple.
timeout_ms An optional int. Defaults to -1. If the queue is empty, this operation will block for up to timeout_ms milliseconds. Note: This option is not supported yet.
name A name for the operation (optional).
Returns A list of Tensor objects of type component_types. | tensorflow.raw_ops.queuedequeuev2 |
tf.raw_ops.QueueEnqueue Enqueues a tuple of one or more tensors in the given queue. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.QueueEnqueue
tf.raw_ops.QueueEnqueue(
handle, components, timeout_ms=-1, name=None
)
The components input has k elements, which correspond to the components of tuples stored in the given queue. N.B. If the queue is full, this operation will block until the given element has been enqueued (or 'timeout_ms' elapses, if specified).
Args
handle A Tensor of type mutable string. The handle to a queue.
components A list of Tensor objects. One or more tensors from which the enqueued tensors should be taken.
timeout_ms An optional int. Defaults to -1. If the queue is full, this operation will block for up to timeout_ms milliseconds. Note: This option is not supported yet.
name A name for the operation (optional).
Returns The created Operation. | tensorflow.raw_ops.queueenqueue |
tf.raw_ops.QueueEnqueueMany Enqueues zero or more tuples of one or more tensors in the given queue. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.QueueEnqueueMany
tf.raw_ops.QueueEnqueueMany(
handle, components, timeout_ms=-1, name=None
)
This operation slices each component tensor along the 0th dimension to make multiple queue elements. All of the tuple components must have the same size in the 0th dimension. The components input has k elements, which correspond to the components of tuples stored in the given queue. N.B. If the queue is full, this operation will block until the given elements have been enqueued (or 'timeout_ms' elapses, if specified).
Args
handle A Tensor of type mutable string. The handle to a queue.
components A list of Tensor objects. One or more tensors from which the enqueued tensors should be taken.
timeout_ms An optional int. Defaults to -1. If the queue is too full, this operation will block for up to timeout_ms milliseconds. Note: This option is not supported yet.
name A name for the operation (optional).
Returns The created Operation. | tensorflow.raw_ops.queueenqueuemany |
tf.raw_ops.QueueEnqueueManyV2 Enqueues zero or more tuples of one or more tensors in the given queue. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.QueueEnqueueManyV2
tf.raw_ops.QueueEnqueueManyV2(
handle, components, timeout_ms=-1, name=None
)
This operation slices each component tensor along the 0th dimension to make multiple queue elements. All of the tuple components must have the same size in the 0th dimension. The components input has k elements, which correspond to the components of tuples stored in the given queue. N.B. If the queue is full, this operation will block until the given elements have been enqueued (or 'timeout_ms' elapses, if specified).
Args
handle A Tensor of type resource. The handle to a queue.
components A list of Tensor objects. One or more tensors from which the enqueued tensors should be taken.
timeout_ms An optional int. Defaults to -1. If the queue is too full, this operation will block for up to timeout_ms milliseconds. Note: This option is not supported yet.
name A name for the operation (optional).
Returns The created Operation. | tensorflow.raw_ops.queueenqueuemanyv2 |
tf.raw_ops.QueueEnqueueV2 Enqueues a tuple of one or more tensors in the given queue. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.QueueEnqueueV2
tf.raw_ops.QueueEnqueueV2(
handle, components, timeout_ms=-1, name=None
)
The components input has k elements, which correspond to the components of tuples stored in the given queue. N.B. If the queue is full, this operation will block until the given element has been enqueued (or 'timeout_ms' elapses, if specified).
Args
handle A Tensor of type resource. The handle to a queue.
components A list of Tensor objects. One or more tensors from which the enqueued tensors should be taken.
timeout_ms An optional int. Defaults to -1. If the queue is full, this operation will block for up to timeout_ms milliseconds. Note: This option is not supported yet.
name A name for the operation (optional).
Returns The created Operation. | tensorflow.raw_ops.queueenqueuev2 |
tf.raw_ops.QueueIsClosed Returns true if queue is closed. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.QueueIsClosed
tf.raw_ops.QueueIsClosed(
handle, name=None
)
This operation returns true if the queue is closed and false if the queue is open.
Args
handle A Tensor of type mutable string. The handle to a queue.
name A name for the operation (optional).
Returns A Tensor of type bool. | tensorflow.raw_ops.queueisclosed |
tf.raw_ops.QueueIsClosedV2 Returns true if queue is closed. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.QueueIsClosedV2
tf.raw_ops.QueueIsClosedV2(
handle, name=None
)
This operation returns true if the queue is closed and false if the queue is open.
Args
handle A Tensor of type resource. The handle to a queue.
name A name for the operation (optional).
Returns A Tensor of type bool. | tensorflow.raw_ops.queueisclosedv2 |
tf.raw_ops.QueueSize Computes the number of elements in the given queue. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.QueueSize
tf.raw_ops.QueueSize(
handle, name=None
)
Args
handle A Tensor of type mutable string. The handle to a queue.
name A name for the operation (optional).
Returns A Tensor of type int32. | tensorflow.raw_ops.queuesize |
tf.raw_ops.QueueSizeV2 Computes the number of elements in the given queue. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.QueueSizeV2
tf.raw_ops.QueueSizeV2(
handle, name=None
)
Args
handle A Tensor of type resource. The handle to a queue.
name A name for the operation (optional).
Returns A Tensor of type int32. | tensorflow.raw_ops.queuesizev2 |
tf.raw_ops.RaggedBincount Counts the number of occurrences of each value in an integer array. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.RaggedBincount
tf.raw_ops.RaggedBincount(
splits, values, size, weights, binary_output=False, name=None
)
Outputs a vector with length size and the same dtype as weights. If weights are empty, then index i stores the number of times the value i is counted in arr. If weights are non-empty, then index i stores the sum of the value in weights at each index where the corresponding value in arr is i. Values in arr outside of the range [0, size) are ignored.
Args
splits A Tensor of type int64. 1D int64 Tensor.
values A Tensor. Must be one of the following types: int32, int64. 2D int Tensor.
size A Tensor. Must have the same type as values. non-negative int scalar Tensor.
weights A Tensor. Must be one of the following types: int32, int64, float32, float64. is an int32, int64, float32, or float64 Tensor with the same shape as input, or a length-0 Tensor, in which case it acts as all weights equal to 1.
binary_output An optional bool. Defaults to False. bool; Whether the kernel should count the appearance or number of occurrences.
name A name for the operation (optional).
Returns A Tensor. Has the same type as weights. | tensorflow.raw_ops.raggedbincount |
tf.raw_ops.RaggedCountSparseOutput Performs sparse-output bin counting for a ragged tensor input. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.RaggedCountSparseOutput
tf.raw_ops.RaggedCountSparseOutput(
splits, values, weights, binary_output, minlength=-1, maxlength=-1, name=None
)
Counts the number of times each value occurs in the input.
Args
splits A Tensor of type int64. Tensor containing the row splits of the ragged tensor to count.
values A Tensor. Must be one of the following types: int32, int64. Tensor containing values of the sparse tensor to count.
weights A Tensor. Must be one of the following types: int32, int64, float32, float64. A Tensor of the same shape as indices containing per-index weight values. May also be the empty tensor if no weights are used.
binary_output A bool. Whether to output the number of occurrences of each value or 1.
minlength An optional int that is >= -1. Defaults to -1. Minimum value to count. Can be set to -1 for no minimum.
maxlength An optional int that is >= -1. Defaults to -1. Maximum value to count. Can be set to -1 for no maximum.
name A name for the operation (optional).
Returns A tuple of Tensor objects (output_indices, output_values, output_dense_shape). output_indices A Tensor of type int64.
output_values A Tensor. Has the same type as weights.
output_dense_shape A Tensor of type int64. | tensorflow.raw_ops.raggedcountsparseoutput |
tf.raw_ops.RaggedCross Generates a feature cross from a list of tensors, and returns it as a View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.RaggedCross
tf.raw_ops.RaggedCross(
ragged_values, ragged_row_splits, sparse_indices, sparse_values, sparse_shape,
dense_inputs, input_order, hashed_output, num_buckets, hash_key,
out_values_type, out_row_splits_type, name=None
)
RaggedTensor. See tf.ragged.cross for more details. Args: ragged_values: A list of Tensor objects with types from: int64, string. The values tensor for each RaggedTensor input. ragged_row_splits: A list of Tensor objects with types from: int32, int64. The row_splits tensor for each RaggedTensor input. sparse_indices: A list of Tensor objects with type int64. The indices tensor for each SparseTensor input. sparse_values: A list of Tensor objects with types from: int64, string. The values tensor for each SparseTensor input. sparse_shape: A list with the same length as sparse_indices of Tensor objects with type int64. The dense_shape tensor for each SparseTensor input. dense_inputs: A list of Tensor objects with types from: int64, string. The tf.Tensor inputs. input_order: A string. String specifying the tensor type for each input. The ith character in this string specifies the type of the ith input, and is one of: 'R' (ragged), 'D' (dense), or 'S' (sparse). This attr is used to ensure that the crossed values are combined in the order of the inputs from the call to tf.ragged.cross. hashed_output: A bool. num_buckets: An int that is >= 0. hash_key: An int. out_values_type: A tf.DType from: tf.int64, tf.string. out_row_splits_type: A tf.DType from: tf.int32, tf.int64. name: A name for the operation (optional). Returns: A tuple of Tensor objects (output_values, output_row_splits). output_values: A `Tensor` of type `out_values_type`.
output_row_splits: A `Tensor` of type `out_row_splits_type`. | tensorflow.raw_ops.raggedcross |
tf.raw_ops.RaggedGather Gather ragged slices from params axis 0 according to indices. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.RaggedGather
tf.raw_ops.RaggedGather(
params_nested_splits, params_dense_values, indices, OUTPUT_RAGGED_RANK,
name=None
)
Outputs a RaggedTensor output composed from output_dense_values and output_nested_splits, such that: output.shape = indices.shape + params.shape[1:]
output.ragged_rank = indices.shape.ndims + params.ragged_rank
output[i...j, d0...dn] = params[indices[i...j], d0...dn]
where
params = ragged.from_nested_row_splits(params_dense_values, params_nested_splits) provides the values that should be gathered.
indices ia a dense tensor with dtype int32 or int64, indicating which values should be gathered.
output = ragged.from_nested_row_splits(output_dense_values, output_nested_splits) is the output tensor. (Note: This c++ op is used to implement the higher-level python tf.ragged.gather op, which also supports ragged indices.)
Args
params_nested_splits A list of at least 1 Tensor objects with the same type in: int32, int64. The nested_row_splits tensors that define the row-partitioning for the params RaggedTensor input.
params_dense_values A Tensor. The flat_values for the params RaggedTensor. There was a terminology change at the python level from dense_values to flat_values, so dense_values is the deprecated name.
indices A Tensor. Must be one of the following types: int32, int64. Indices in the outermost dimension of params of the values that should be gathered.
OUTPUT_RAGGED_RANK An int that is >= 0. The ragged rank of the output RaggedTensor. output_nested_splits will contain this number of row_splits tensors. This value should equal indices.shape.ndims + params.ragged_rank - 1.
name A name for the operation (optional).
Returns A tuple of Tensor objects (output_nested_splits, output_dense_values). output_nested_splits A list of OUTPUT_RAGGED_RANK Tensor objects with the same type as params_nested_splits.
output_dense_values A Tensor. Has the same type as params_dense_values. | tensorflow.raw_ops.raggedgather |
tf.raw_ops.RaggedRange Returns a RaggedTensor containing the specified sequences of numbers. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.RaggedRange
tf.raw_ops.RaggedRange(
starts, limits, deltas, Tsplits=tf.dtypes.int64, name=None
)
Returns a RaggedTensor result composed from rt_dense_values and rt_nested_splits, such that result[i] = range(starts[i], limits[i], deltas[i]). (rt_nested_splits, rt_dense_values) = ragged_range(
starts=[2, 5, 8], limits=[3, 5, 12], deltas=1)
result = tf.ragged.from_row_splits(rt_dense_values, rt_nested_splits)
print(result)
<tf.RaggedTensor [[2], [], [8, 9, 10, 11]] >
The input tensors starts, limits, and deltas may be scalars or vectors. The vector inputs must all have the same size. Scalar inputs are broadcast to match the size of the vector inputs.
Args
starts A Tensor. Must be one of the following types: bfloat16, float32, float64, int32, int64. The starts of each range.
limits A Tensor. Must have the same type as starts. The limits of each range.
deltas A Tensor. Must have the same type as starts. The deltas of each range.
Tsplits An optional tf.DType from: tf.int32, tf.int64. Defaults to tf.int64.
name A name for the operation (optional).
Returns A tuple of Tensor objects (rt_nested_splits, rt_dense_values). rt_nested_splits A Tensor of type Tsplits.
rt_dense_values A Tensor. Has the same type as starts. | tensorflow.raw_ops.raggedrange |
tf.raw_ops.RaggedTensorFromVariant Decodes a variant Tensor into a RaggedTensor. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.RaggedTensorFromVariant
tf.raw_ops.RaggedTensorFromVariant(
encoded_ragged, input_ragged_rank, output_ragged_rank, Tvalues,
Tsplits=tf.dtypes.int64, name=None
)
Decodes the given variant Tensor and returns a RaggedTensor. The input could be a scalar, meaning it encodes a single RaggedTensor with ragged_rank output_ragged_rank. It could also have an arbitrary rank, in which case each element is decoded into a RaggedTensor with ragged_rank input_ragged_rank and these are then stacked according to the input shape to output a single RaggedTensor with ragged_rank output_ragged_rank. Each variant element in the input Tensor is decoded by retrieving from the element a 1-D variant Tensor with input_ragged_rank + 1 Tensors, corresponding to the splits and values of the decoded RaggedTensor. If input_ragged_rank is -1, then it is inferred as output_ragged_rank - rank(encoded_ragged). See RaggedTensorToVariant for the corresponding encoding logic.
Args
encoded_ragged A Tensor of type variant. A variant Tensor containing encoded RaggedTensors.
input_ragged_rank An int that is >= -1. The ragged rank of each encoded RaggedTensor component in the input. If set to -1, this is inferred as output_ragged_rank - rank(encoded_ragged)
output_ragged_rank An int that is >= 0. The expected ragged rank of the output RaggedTensor. The following must hold: output_ragged_rank = rank(encoded_ragged) + input_ragged_rank.
Tvalues A tf.DType.
Tsplits An optional tf.DType from: tf.int32, tf.int64. Defaults to tf.int64.
name A name for the operation (optional).
Returns A tuple of Tensor objects (output_nested_splits, output_dense_values). output_nested_splits A list of output_ragged_rank Tensor objects with type Tsplits.
output_dense_values A Tensor of type Tvalues. | tensorflow.raw_ops.raggedtensorfromvariant |
tf.raw_ops.RaggedTensorToSparse Converts a RaggedTensor into a SparseTensor with the same values. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.RaggedTensorToSparse
tf.raw_ops.RaggedTensorToSparse(
rt_nested_splits, rt_dense_values, name=None
)
input=ragged.from_nested_row_splits(rt_dense_values, rt_nested_splits) output=SparseTensor(indices=sparse_indices, values=sparse_values, dense_shape=sparse_dense_shape)
Args
rt_nested_splits A list of at least 1 Tensor objects with the same type in: int32, int64. The row_splits for the RaggedTensor.
rt_dense_values A Tensor. The flat_values for the RaggedTensor.
name A name for the operation (optional).
Returns A tuple of Tensor objects (sparse_indices, sparse_values, sparse_dense_shape). sparse_indices A Tensor of type int64.
sparse_values A Tensor. Has the same type as rt_dense_values.
sparse_dense_shape A Tensor of type int64. | tensorflow.raw_ops.raggedtensortosparse |
tf.raw_ops.RaggedTensorToTensor Create a dense tensor from a ragged tensor, possibly altering its shape. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.RaggedTensorToTensor
tf.raw_ops.RaggedTensorToTensor(
shape, values, default_value, row_partition_tensors, row_partition_types,
name=None
)
The ragged_to_dense op creates a dense tensor from a list of row partition tensors, a value vector, and default values. If the shape is unspecified, the minimal shape required to contain all the elements in the ragged tensor (the natural shape) will be used. If some dimensions are left unspecified, then the size of the natural shape is used in that dimension. The default_value will be broadcast to the output shape. After that, the values from the ragged tensor overwrite the default values. Note that the default_value must have less dimensions than the value. The row partition tensors are in the order of the dimensions. At present, the types can be: "ROW_SPLITS": the row_splits tensor from the ragged tensor. "VALUE_ROWIDS": the value_rowids tensor from the ragged tensor. "FIRST_DIM_SIZE": if value_rowids is used for the first dimension, then it is preceded by "FIRST_DIM_SIZE".
Args
shape A Tensor. Must be one of the following types: int64, int32. The desired shape of the the output tensor. If left unspecified (empty), the minimal shape required to contain all the elements in the ragged tensor (the natural shape) will be used. If some dimensions are left unspecified, then the size of the natural shape is used in that dimension. Note that dense dimensions cannot be modified by the shape argument. Trying to change the size of a dense dimension will cause the op to fail. Examples: natural shape: [4, 5, 6] shape: -1 output shape: [4, 5, 6] natural shape: [4, 5, 6] shape: [3, -1, 2] output shape: [3, 5, 2] natural shape: [4, 5, 6] shape: [3, 7, 2] output shape: [3, 7, 2]
values A Tensor. A 1D tensor representing the values of the ragged tensor.
default_value A Tensor. Must have the same type as values. The default_value when the shape is larger than the ragged tensor. The default_value is broadcast until it is the shape of the output tensor, and then overwritten by values in the ragged tensor. The default value must be compatible with this broadcast operation, and must have fewer dimensions than the value tensor.
row_partition_tensors A list of at least 1 Tensor objects with the same type in: int64, int32.
row_partition_types A list of strings. The types of the row partition tensors. At present, these can be: "ROW_SPLITS": the row_splits tensor from the ragged tensor. "VALUE_ROWIDS": the value_rowids tensor from the ragged tensor. "FIRST_DIM_SIZE": if value_rowids is used for the first dimension, then it is preceeded by "FIRST_DIM_SIZE". The tensors are in the order of the dimensions.
name A name for the operation (optional).
Returns A Tensor. Has the same type as values. | tensorflow.raw_ops.raggedtensortotensor |
tf.raw_ops.RaggedTensorToVariant Encodes a RaggedTensor into a variant Tensor. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.RaggedTensorToVariant
tf.raw_ops.RaggedTensorToVariant(
rt_nested_splits, rt_dense_values, batched_input, name=None
)
Encodes the given RaggedTensor and returns a variant Tensor. If batched_input is True, then input RaggedTensor is unbatched along the zero-th dimension, each component RaggedTensor is encoded into a scalar variant Tensor, and these are stacked to return a 1-D variant Tensor. If batched_input is False, then the input RaggedTensor is encoded as is and a scalar variant Tensor is returned. A RaggedTensor is encoded by first creating a 1-D variant Tensor with ragged_rank + 1 elements, containing the splits and values Tensors of the RaggedTensor. Then the 1-D variant Tensor is wrapped in a scalar variant Tensor. See RaggedTensorFromVariant for the corresponding decoding logic.
Args
rt_nested_splits A list of Tensor objects with the same type in: int32, int64. A list of one or more Tensors representing the splits of the input RaggedTensor.
rt_dense_values A Tensor. A Tensor representing the values of the input RaggedTensor.
batched_input A bool. A bool denoting whether the input is a batched RaggedTensor.
name A name for the operation (optional).
Returns A Tensor of type variant. | tensorflow.raw_ops.raggedtensortovariant |
tf.raw_ops.RaggedTensorToVariantGradient Helper used to compute the gradient for RaggedTensorToVariant. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.RaggedTensorToVariantGradient
tf.raw_ops.RaggedTensorToVariantGradient(
encoded_ragged_grad, row_splits, dense_values_shape, Tvalues, name=None
)
Computes the gradient for the dense_values input to the RaggedTensorToVariant op, given the variant-encoded ragged gradients of the outputs, along with the outer row-splits and the shape of the dense-values that were provided as inputs to the RaggedTensorToVariant op.
Args
encoded_ragged_grad A Tensor of type variant. A variant Tensor containing encoded RaggedTensor gradients.
row_splits A Tensor. Must be one of the following types: int32, int64. Outermost row-splits that were used as input to the RaggedTensorToVariant op.
dense_values_shape A Tensor of type int32. Shape of the dense_values that was used as an input to the RaggedTensorToVariant op.
Tvalues A tf.DType.
name A name for the operation (optional).
Returns A Tensor of type Tvalues. | tensorflow.raw_ops.raggedtensortovariantgradient |
tf.raw_ops.RandomCrop Randomly crop image. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.RandomCrop
tf.raw_ops.RandomCrop(
image, size, seed=0, seed2=0, name=None
)
size is a 1-D int64 tensor with 2 elements representing the crop height and width. The values must be non negative. This Op picks a random location in image and crops a height by width rectangle from that location. The random location is picked so the cropped area will fit inside the original image.
Args
image A Tensor. Must be one of the following types: uint8, int8, int16, int32, int64, float32, float64. 3-D of shape [height, width, channels].
size A Tensor of type int64. 1-D of length 2 containing: crop_height, crop_width..
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 Tensor. Has the same type as image. | tensorflow.raw_ops.randomcrop |
tf.raw_ops.RandomDataset Creates a Dataset that returns pseudorandom numbers. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.RandomDataset
tf.raw_ops.RandomDataset(
seed, seed2, output_types, output_shapes, name=None
)
Creates a Dataset that returns a stream of uniformly distributed pseudorandom 64-bit signed integers. In the TensorFlow Python API, you can instantiate this dataset via the class tf.data.experimental.RandomDataset. Instances of this dataset are also created as a result of the hoist_random_uniform static optimization. Whether this optimization is performed is determined by the experimental_optimization.hoist_random_uniform option of tf.data.Options.
Args
seed A Tensor of type int64. A scalar seed for the random number generator. If either seed or seed2 is set to be non-zero, the random number generator is seeded by the given seed. Otherwise, a random seed is used.
seed2 A Tensor of type int64. A second scalar seed to avoid seed collision.
output_types A list of tf.DTypes that has length >= 1.
output_shapes A list of shapes (each a tf.TensorShape or list of ints) that has length >= 1.
name A name for the operation (optional).
Returns A Tensor of type variant. | tensorflow.raw_ops.randomdataset |
tf.raw_ops.RandomGamma Outputs random values from the Gamma distribution(s) described by alpha. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.RandomGamma
tf.raw_ops.RandomGamma(
shape, alpha, seed=0, seed2=0, name=None
)
This op uses the algorithm by Marsaglia et al. to acquire samples via transformation-rejection from pairs of uniform and normal random variables. See http://dl.acm.org/citation.cfm?id=358414
Args
shape A Tensor. Must be one of the following types: int32, int64. 1-D integer tensor. Shape of independent samples to draw from each distribution described by the shape parameters given in alpha.
alpha A Tensor. Must be one of the following types: half, float32, float64. A tensor in which each scalar is a "shape" parameter describing the associated gamma distribution.
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. A second seed to avoid seed collision.
name A name for the operation (optional).
Returns A Tensor. Has the same type as alpha. | tensorflow.raw_ops.randomgamma |
tf.raw_ops.RandomGammaGrad Computes the derivative of a Gamma random sample w.r.t. alpha. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.RandomGammaGrad
tf.raw_ops.RandomGammaGrad(
alpha, sample, name=None
)
Args
alpha A Tensor. Must be one of the following types: float32, float64.
sample A Tensor. Must have the same type as alpha.
name A name for the operation (optional).
Returns A Tensor. Has the same type as alpha. | tensorflow.raw_ops.randomgammagrad |
tf.raw_ops.RandomPoisson Use RandomPoissonV2 instead. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.RandomPoisson
tf.raw_ops.RandomPoisson(
shape, rate, seed=0, seed2=0, name=None
)
Args
shape A Tensor. Must be one of the following types: int32, int64.
rate A Tensor. Must be one of the following types: half, float32, float64.
seed An optional int. Defaults to 0.
seed2 An optional int. Defaults to 0.
name A name for the operation (optional).
Returns A Tensor. Has the same type as rate. | tensorflow.raw_ops.randompoisson |
tf.raw_ops.RandomPoissonV2 Outputs random values from the Poisson distribution(s) described by rate. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.RandomPoissonV2
tf.raw_ops.RandomPoissonV2(
shape, rate, seed=0, seed2=0, dtype=tf.dtypes.int64, name=None
)
This op uses two algorithms, depending on rate. If rate >= 10, then the algorithm by Hormann is used to acquire samples via transformation-rejection. See http://www.sciencedirect.com/science/article/pii/0167668793909974 Otherwise, Knuth's algorithm is used to acquire samples via multiplying uniform random variables. See Donald E. Knuth (1969). Seminumerical Algorithms. The Art of Computer Programming, Volume 2. Addison Wesley
Args
shape A Tensor. Must be one of the following types: int32, int64. 1-D integer tensor. Shape of independent samples to draw from each distribution described by the shape parameters given in rate.
rate A Tensor. Must be one of the following types: half, float32, float64, int32, int64. A tensor in which each scalar is a "rate" parameter describing the associated poisson distribution.
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. A second seed to avoid seed collision.
dtype An optional tf.DType from: tf.half, tf.float32, tf.float64, tf.int32, tf.int64. Defaults to tf.int64.
name A name for the operation (optional).
Returns A Tensor of type dtype. | tensorflow.raw_ops.randompoissonv2 |
tf.raw_ops.RandomShuffle Randomly shuffles a tensor along its first dimension. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.RandomShuffle
tf.raw_ops.RandomShuffle(
value, seed=0, seed2=0, name=None
)
The tensor is shuffled along dimension 0, such that each value[j] is mapped to one and only one output[i]. For example, a mapping that might occur for a 3x2 tensor is: [[1, 2], [[5, 6],
[3, 4], ==> [1, 2],
[5, 6]] [3, 4]]
Args
value A Tensor. The tensor to be shuffled.
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. A second seed to avoid seed collision.
name A name for the operation (optional).
Returns A Tensor. Has the same type as value. | tensorflow.raw_ops.randomshuffle |
tf.raw_ops.RandomShuffleQueue A queue that randomizes the order of elements. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.RandomShuffleQueue
tf.raw_ops.RandomShuffleQueue(
component_types, shapes=[], capacity=-1, min_after_dequeue=0, seed=0, seed2=0,
container='', shared_name='', name=None
)
Args
component_types A list of tf.DTypes that has length >= 1. The type of each component in a value.
shapes An optional list of shapes (each a tf.TensorShape or list of ints). Defaults to []. The shape of each component in a value. The length of this attr must be either 0 or the same as the length of component_types. If the length of this attr is 0, the shapes of queue elements are not constrained, and only one element may be dequeued at a time.
capacity An optional int. Defaults to -1. The upper bound on the number of elements in this queue. Negative numbers mean no limit.
min_after_dequeue An optional int. Defaults to 0. Dequeue will block unless there would be this many elements after the dequeue or the queue is closed. This ensures a minimum level of mixing of elements.
seed An optional int. Defaults to 0. If either seed or seed2 is set to be non-zero, the random number generator is seeded by the given seed. Otherwise, a random seed is used.
seed2 An optional int. Defaults to 0. A second seed to avoid seed collision.
container An optional string. Defaults to "". If non-empty, this queue is placed in the given container. Otherwise, a default container is used.
shared_name An optional string. Defaults to "". If non-empty, this queue will be shared under the given name across multiple sessions.
name A name for the operation (optional).
Returns A Tensor of type mutable string. | tensorflow.raw_ops.randomshufflequeue |
tf.raw_ops.RandomShuffleQueueV2 A queue that randomizes the order of elements. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.RandomShuffleQueueV2
tf.raw_ops.RandomShuffleQueueV2(
component_types, shapes=[], capacity=-1, min_after_dequeue=0, seed=0, seed2=0,
container='', shared_name='', name=None
)
Args
component_types A list of tf.DTypes that has length >= 1. The type of each component in a value.
shapes An optional list of shapes (each a tf.TensorShape or list of ints). Defaults to []. The shape of each component in a value. The length of this attr must be either 0 or the same as the length of component_types. If the length of this attr is 0, the shapes of queue elements are not constrained, and only one element may be dequeued at a time.
capacity An optional int. Defaults to -1. The upper bound on the number of elements in this queue. Negative numbers mean no limit.
min_after_dequeue An optional int. Defaults to 0. Dequeue will block unless there would be this many elements after the dequeue or the queue is closed. This ensures a minimum level of mixing of elements.
seed An optional int. Defaults to 0. If either seed or seed2 is set to be non-zero, the random number generator is seeded by the given seed. Otherwise, a random seed is used.
seed2 An optional int. Defaults to 0. A second seed to avoid seed collision.
container An optional string. Defaults to "". If non-empty, this queue is placed in the given container. Otherwise, a default container is used.
shared_name An optional string. Defaults to "". If non-empty, this queue will be shared under the given name across multiple sessions.
name A name for the operation (optional).
Returns A Tensor of type resource. | tensorflow.raw_ops.randomshufflequeuev2 |
tf.raw_ops.RandomStandardNormal Outputs random values from a normal distribution. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.RandomStandardNormal
tf.raw_ops.RandomStandardNormal(
shape, dtype, seed=0, seed2=0, name=None
)
The generated values will have mean 0 and standard deviation 1.
Args
shape A Tensor. Must be one of the following types: int32, int64. The shape of the output tensor.
dtype A tf.DType from: tf.half, tf.bfloat16, tf.float32, tf.float64. The type of the output.
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. A second seed to avoid seed collision.
name A name for the operation (optional).
Returns A Tensor of type dtype. | tensorflow.raw_ops.randomstandardnormal |
tf.raw_ops.RandomUniform Outputs random values from a uniform distribution. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.RandomUniform
tf.raw_ops.RandomUniform(
shape, dtype, seed=0, seed2=0, name=None
)
The generated values follow a uniform distribution in the range [0, 1). The lower bound 0 is included in the range, while the upper bound 1 is excluded.
Args
shape A Tensor. Must be one of the following types: int32, int64. The shape of the output tensor.
dtype A tf.DType from: tf.half, tf.bfloat16, tf.float32, tf.float64. The type of the output.
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. A second seed to avoid seed collision.
name A name for the operation (optional).
Returns A Tensor of type dtype. | tensorflow.raw_ops.randomuniform |
tf.raw_ops.RandomUniformInt Outputs random integers from a uniform distribution. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.RandomUniformInt
tf.raw_ops.RandomUniformInt(
shape, minval, maxval, seed=0, seed2=0, name=None
)
The generated values are uniform integers in the range [minval, maxval). The lower bound minval is included in the range, while the upper bound maxval is excluded. The random integers are slightly biased unless maxval - minval is an exact power of two. The bias is small for values of maxval - minval significantly smaller than the range of the output (either 2^32 or 2^64).
Args
shape A Tensor. Must be one of the following types: int32, int64. The shape of the output tensor.
minval A Tensor. Must be one of the following types: int32, int64. 0-D. Inclusive lower bound on the generated integers.
maxval A Tensor. Must have the same type as minval. 0-D. Exclusive upper bound on the generated integers.
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. A second seed to avoid seed collision.
name A name for the operation (optional).
Returns A Tensor. Has the same type as minval. | tensorflow.raw_ops.randomuniformint |
tf.raw_ops.Range Creates a sequence of numbers. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.Range
tf.raw_ops.Range(
start, limit, delta, name=None
)
This operation creates a sequence of numbers that begins at start and extends by increments of delta up to but not including limit. For example: # 'start' is 3
# 'limit' is 18
# 'delta' is 3
tf.range(start, limit, delta) ==> [3, 6, 9, 12, 15]
Args
start A Tensor. Must be one of the following types: bfloat16, half, float32, float64, int32, int64. 0-D (scalar). First entry in the sequence.
limit A Tensor. Must have the same type as start. 0-D (scalar). Upper limit of sequence, exclusive.
delta A Tensor. Must have the same type as start. 0-D (scalar). Optional. Default is 1. Number that increments start.
name A name for the operation (optional).
Returns A Tensor. Has the same type as start. | tensorflow.raw_ops.range |
tf.raw_ops.RangeDataset Creates a dataset with a range of values. Corresponds to python's xrange. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.RangeDataset
tf.raw_ops.RangeDataset(
start, stop, step, output_types, output_shapes, name=None
)
Args
start A Tensor of type int64. corresponds to start in python's xrange().
stop A Tensor of type int64. corresponds to stop in python's xrange().
step A Tensor of type int64. corresponds to step in python's xrange().
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.rangedataset |
tf.raw_ops.Rank Returns the rank of a tensor. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.Rank
tf.raw_ops.Rank(
input, name=None
)
This operation returns an integer representing the rank of input. For example: # 't' is [[[1, 1, 1], [2, 2, 2]], [[3, 3, 3], [4, 4, 4]]]
# shape of tensor 't' is [2, 2, 3]
rank(t) ==> 3
Note: The rank of a tensor is not the same as the rank of a matrix. The rank of a tensor is the number of indices required to uniquely select each element of the tensor. Rank is also known as "order", "degree", or "ndims."
Args
input A Tensor.
name A name for the operation (optional).
Returns A Tensor of type int32. | tensorflow.raw_ops.rank |
tf.raw_ops.ReaderNumRecordsProduced Returns the number of records this Reader has produced. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.ReaderNumRecordsProduced
tf.raw_ops.ReaderNumRecordsProduced(
reader_handle, name=None
)
This is the same as the number of ReaderRead executions that have succeeded.
Args
reader_handle A Tensor of type mutable string. Handle to a Reader.
name A name for the operation (optional).
Returns A Tensor of type int64. | tensorflow.raw_ops.readernumrecordsproduced |
tf.raw_ops.ReaderNumRecordsProducedV2 Returns the number of records this Reader has produced. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.ReaderNumRecordsProducedV2
tf.raw_ops.ReaderNumRecordsProducedV2(
reader_handle, name=None
)
This is the same as the number of ReaderRead executions that have succeeded.
Args
reader_handle A Tensor of type resource. Handle to a Reader.
name A name for the operation (optional).
Returns A Tensor of type int64. | tensorflow.raw_ops.readernumrecordsproducedv2 |
tf.raw_ops.ReaderNumWorkUnitsCompleted Returns the number of work units this Reader has finished processing. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.ReaderNumWorkUnitsCompleted
tf.raw_ops.ReaderNumWorkUnitsCompleted(
reader_handle, name=None
)
Args
reader_handle A Tensor of type mutable string. Handle to a Reader.
name A name for the operation (optional).
Returns A Tensor of type int64. | tensorflow.raw_ops.readernumworkunitscompleted |
tf.raw_ops.ReaderNumWorkUnitsCompletedV2 Returns the number of work units this Reader has finished processing. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.ReaderNumWorkUnitsCompletedV2
tf.raw_ops.ReaderNumWorkUnitsCompletedV2(
reader_handle, name=None
)
Args
reader_handle A Tensor of type resource. Handle to a Reader.
name A name for the operation (optional).
Returns A Tensor of type int64. | tensorflow.raw_ops.readernumworkunitscompletedv2 |
tf.raw_ops.ReaderRead Returns the next record (key, value pair) produced by a Reader. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.ReaderRead
tf.raw_ops.ReaderRead(
reader_handle, queue_handle, name=None
)
Will dequeue from the input queue if necessary (e.g. when the Reader needs to start reading from a new file since it has finished with the previous file).
Args
reader_handle A Tensor of type mutable string. Handle to a Reader.
queue_handle A Tensor of type mutable string. Handle to a Queue, with string work items.
name A name for the operation (optional).
Returns A tuple of Tensor objects (key, value). key A Tensor of type string.
value A Tensor of type string. | tensorflow.raw_ops.readerread |
tf.raw_ops.ReaderReadUpTo Returns up to num_records (key, value) pairs produced by a Reader. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.ReaderReadUpTo
tf.raw_ops.ReaderReadUpTo(
reader_handle, queue_handle, num_records, name=None
)
Will dequeue from the input queue if necessary (e.g. when the Reader needs to start reading from a new file since it has finished with the previous file). It may return less than num_records even before the last batch.
Args
reader_handle A Tensor of type mutable string. Handle to a Reader.
queue_handle A Tensor of type mutable string. Handle to a Queue, with string work items.
num_records A Tensor of type int64. number of records to read from Reader.
name A name for the operation (optional).
Returns A tuple of Tensor objects (keys, values). keys A Tensor of type string.
values A Tensor of type string. | tensorflow.raw_ops.readerreadupto |
tf.raw_ops.ReaderReadUpToV2 Returns up to num_records (key, value) pairs produced by a Reader. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.ReaderReadUpToV2
tf.raw_ops.ReaderReadUpToV2(
reader_handle, queue_handle, num_records, name=None
)
Will dequeue from the input queue if necessary (e.g. when the Reader needs to start reading from a new file since it has finished with the previous file). It may return less than num_records even before the last batch.
Args
reader_handle A Tensor of type resource. Handle to a Reader.
queue_handle A Tensor of type resource. Handle to a Queue, with string work items.
num_records A Tensor of type int64. number of records to read from Reader.
name A name for the operation (optional).
Returns A tuple of Tensor objects (keys, values). keys A Tensor of type string.
values A Tensor of type string. | tensorflow.raw_ops.readerreaduptov2 |
tf.raw_ops.ReaderReadV2 Returns the next record (key, value pair) produced by a Reader. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.ReaderReadV2
tf.raw_ops.ReaderReadV2(
reader_handle, queue_handle, name=None
)
Will dequeue from the input queue if necessary (e.g. when the Reader needs to start reading from a new file since it has finished with the previous file).
Args
reader_handle A Tensor of type resource. Handle to a Reader.
queue_handle A Tensor of type resource. Handle to a Queue, with string work items.
name A name for the operation (optional).
Returns A tuple of Tensor objects (key, value). key A Tensor of type string.
value A Tensor of type string. | tensorflow.raw_ops.readerreadv2 |
tf.raw_ops.ReaderReset Restore a Reader to its initial clean state. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.ReaderReset
tf.raw_ops.ReaderReset(
reader_handle, name=None
)
Args
reader_handle A Tensor of type mutable string. Handle to a Reader.
name A name for the operation (optional).
Returns The created Operation. | tensorflow.raw_ops.readerreset |
tf.raw_ops.ReaderResetV2 Restore a Reader to its initial clean state. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.ReaderResetV2
tf.raw_ops.ReaderResetV2(
reader_handle, name=None
)
Args
reader_handle A Tensor of type resource. Handle to a Reader.
name A name for the operation (optional).
Returns The created Operation. | tensorflow.raw_ops.readerresetv2 |
tf.raw_ops.ReaderRestoreState Restore a reader to a previously saved state. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.ReaderRestoreState
tf.raw_ops.ReaderRestoreState(
reader_handle, state, name=None
)
Not all Readers support being restored, so this can produce an Unimplemented error.
Args
reader_handle A Tensor of type mutable string. Handle to a Reader.
state A Tensor of type string. Result of a ReaderSerializeState of a Reader with type matching reader_handle.
name A name for the operation (optional).
Returns The created Operation. | tensorflow.raw_ops.readerrestorestate |
tf.raw_ops.ReaderRestoreStateV2 Restore a reader to a previously saved state. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.ReaderRestoreStateV2
tf.raw_ops.ReaderRestoreStateV2(
reader_handle, state, name=None
)
Not all Readers support being restored, so this can produce an Unimplemented error.
Args
reader_handle A Tensor of type resource. Handle to a Reader.
state A Tensor of type string. Result of a ReaderSerializeState of a Reader with type matching reader_handle.
name A name for the operation (optional).
Returns The created Operation. | tensorflow.raw_ops.readerrestorestatev2 |
tf.raw_ops.ReaderSerializeState Produce a string tensor that encodes the state of a Reader. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.ReaderSerializeState
tf.raw_ops.ReaderSerializeState(
reader_handle, name=None
)
Not all Readers support being serialized, so this can produce an Unimplemented error.
Args
reader_handle A Tensor of type mutable string. Handle to a Reader.
name A name for the operation (optional).
Returns A Tensor of type string. | tensorflow.raw_ops.readerserializestate |
tf.raw_ops.ReaderSerializeStateV2 Produce a string tensor that encodes the state of a Reader. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.ReaderSerializeStateV2
tf.raw_ops.ReaderSerializeStateV2(
reader_handle, name=None
)
Not all Readers support being serialized, so this can produce an Unimplemented error.
Args
reader_handle A Tensor of type resource. Handle to a Reader.
name A name for the operation (optional).
Returns A Tensor of type string. | tensorflow.raw_ops.readerserializestatev2 |
tf.raw_ops.ReadFile Reads and outputs the entire contents of the input filename. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.ReadFile
tf.raw_ops.ReadFile(
filename, name=None
)
Args
filename A Tensor of type string.
name A name for the operation (optional).
Returns A Tensor of type string. | tensorflow.raw_ops.readfile |
tf.raw_ops.ReadVariableOp Reads the value of a variable. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.ReadVariableOp
tf.raw_ops.ReadVariableOp(
resource, dtype, name=None
)
The tensor returned by this operation is immutable. The value returned by this operation is guaranteed to be influenced by all the writes on which this operation depends directly or indirectly, and to not be influenced by any of the writes which depend directly or indirectly on this operation.
Args
resource A Tensor of type resource. handle to the resource in which to store the variable.
dtype A tf.DType. the dtype of the value.
name A name for the operation (optional).
Returns A Tensor of type dtype. | tensorflow.raw_ops.readvariableop |
tf.raw_ops.Real Returns the real part of a complex number. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.Real
tf.raw_ops.Real(
input, Tout=tf.dtypes.float32, name=None
)
Given a tensor input of complex numbers, this operation returns a tensor of type float that is the real part of each element in input. All elements in input must be complex numbers of the form \(a + bj\), where a is the real part returned by this operation and b is the imaginary part. For example: # tensor 'input' is [-2.25 + 4.75j, 3.25 + 5.75j]
tf.real(input) ==> [-2.25, 3.25]
Args
input A Tensor. Must be one of the following types: complex64, complex128.
Tout 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 Tout. | tensorflow.raw_ops.real |
tf.raw_ops.RealDiv Returns x / y element-wise for real types. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.RealDiv
tf.raw_ops.RealDiv(
x, y, name=None
)
If x and y are reals, this will return the floating-point division.
Note: Div supports broadcasting. More about broadcasting here
Args
x A Tensor. Must be one of the following types: bfloat16, half, float32, float64, uint8, int8, uint16, int16, int32, int64, complex64, complex128.
y A Tensor. Must have the same type as x.
name A name for the operation (optional).
Returns A Tensor. Has the same type as x. | tensorflow.raw_ops.realdiv |
tf.raw_ops.RebatchDataset Creates a dataset that changes the batch size. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.RebatchDataset
tf.raw_ops.RebatchDataset(
input_dataset, num_replicas, output_types, output_shapes, use_fallback=True,
name=None
)
Creates a dataset that changes the batch size of the dataset to current batch size // num_workers.
Args
input_dataset A Tensor of type variant. A variant tensor representing the input dataset.
num_replicas A Tensor of type int64. A scalar representing the number of replicas to distribute this batch across. As a result of this transformation the current batch size would end up being divided by this parameter.
output_types A list of tf.DTypes that has length >= 1.
output_shapes A list of shapes (each a tf.TensorShape or list of ints) that has length >= 1.
use_fallback An optional bool. Defaults to True.
name A name for the operation (optional).
Returns A Tensor of type variant. | tensorflow.raw_ops.rebatchdataset |
tf.raw_ops.RebatchDatasetV2 Creates a dataset that changes the batch size. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.RebatchDatasetV2
tf.raw_ops.RebatchDatasetV2(
input_dataset, batch_sizes, drop_remainder, output_types, output_shapes,
name=None
)
Creates a dataset that rebatches elements from input_dataset into new batch sizes.
Args
input_dataset A Tensor of type variant. A variant tensor representing the input dataset.
batch_sizes A Tensor of type int64. A vector of integers representing the size of batches to produce. These values are cycled through in order.
drop_remainder A Tensor of type bool.
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.rebatchdatasetv2 |
tf.raw_ops.Reciprocal Computes the reciprocal of x element-wise. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.Reciprocal
tf.raw_ops.Reciprocal(
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.reciprocal |
tf.raw_ops.ReciprocalGrad 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.ReciprocalGrad
tf.raw_ops.ReciprocalGrad(
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.reciprocalgrad |
tf.raw_ops.RecordInput Emits randomized records. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.RecordInput
tf.raw_ops.RecordInput(
file_pattern, file_random_seed=301, file_shuffle_shift_ratio=0,
file_buffer_size=10000, file_parallelism=16, batch_size=32,
compression_type='', name=None
)
Args
file_pattern A string. Glob pattern for the data files.
file_random_seed An optional int. Defaults to 301. Random seeds used to produce randomized records.
file_shuffle_shift_ratio An optional float. Defaults to 0. Shifts the list of files after the list is randomly shuffled.
file_buffer_size An optional int. Defaults to 10000. The randomization shuffling buffer.
file_parallelism An optional int. Defaults to 16. How many sstables are opened and concurrently iterated over.
batch_size An optional int. Defaults to 32. The batch size.
compression_type An optional string. Defaults to "". The type of compression for the file. Currently ZLIB and GZIP are supported. Defaults to none.
name A name for the operation (optional).
Returns A Tensor of type string. | tensorflow.raw_ops.recordinput |
tf.raw_ops.Recv Receives the named tensor from send_device on recv_device. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.Recv
tf.raw_ops.Recv(
tensor_type, tensor_name, send_device, send_device_incarnation, recv_device,
client_terminated=False, name=None
)
Args
tensor_type A tf.DType.
tensor_name A string. The name of the tensor to receive.
send_device A string. The name of the device sending the tensor.
send_device_incarnation An int. The current incarnation of send_device.
recv_device A string. The name of the device receiving the tensor.
client_terminated An optional bool. Defaults to False. If set to true, this indicates that the node was added to the graph as a result of a client-side feed or fetch of Tensor data, in which case the corresponding send or recv is expected to be managed locally by the caller.
name A name for the operation (optional).
Returns A Tensor of type tensor_type. | tensorflow.raw_ops.recv |
tf.raw_ops.RecvTPUEmbeddingActivations An op that receives embedding activations on the TPU. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.RecvTPUEmbeddingActivations
tf.raw_ops.RecvTPUEmbeddingActivations(
num_outputs, config, name=None
)
The TPU system performs the embedding lookups and aggregations specified by the arguments to TPUEmbeddingEnqueue(Integer/Sparse/SparseTensor)Batch. The results of these aggregations are visible to the Tensorflow Graph as the outputs of a RecvTPUEmbeddingActivations op. This op returns a list containing one Tensor of activations per table specified in the model. There can be at most one RecvTPUEmbeddingActivations op in the TPU graph.
Args
num_outputs An int that is >= 1. The number of output activation tensors, equal to the number of embedding tables in the model.
config A string. Serialized TPUEmbeddingConfiguration proto.
name A name for the operation (optional).
Returns A list of num_outputs Tensor objects with type float32. | tensorflow.raw_ops.recvtpuembeddingactivations |
tf.raw_ops.ReduceDataset Reduces the input dataset to a singleton using a reduce function. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.ReduceDataset
tf.raw_ops.ReduceDataset(
input_dataset, initial_state, other_arguments, f, output_types, output_shapes,
use_inter_op_parallelism=True, name=None
)
Args
input_dataset A Tensor of type variant. A variant tensor representing the input dataset.
initial_state A list of Tensor objects. A nested structure of tensors, representing the initial state of the transformation.
other_arguments A list of Tensor objects.
f A function decorated with @Defun. A function that maps (old_state, input_element) to new_state. It must take two arguments and return a nested structures of tensors. The structure of new_state must match the structure of initial_state.
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.
name A name for the operation (optional).
Returns A list of Tensor objects of type output_types. | tensorflow.raw_ops.reducedataset |
tf.raw_ops.ReduceJoin Joins a string Tensor across the given dimensions. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.ReduceJoin
tf.raw_ops.ReduceJoin(
inputs, reduction_indices, keep_dims=False, separator='', name=None
)
Computes the string join across dimensions in the given string Tensor of shape [\\(d_0, d_1, ..., d_{n-1}\\)]. Returns a new Tensor created by joining the input strings with the given separator (default: empty string). Negative indices are counted backwards from the end, with -1 being equivalent to n - 1. If indices are not specified, joins across all dimensions beginning from n - 1 through 0. For example: # tensor `a` is [["a", "b"], ["c", "d"]]
tf.reduce_join(a, 0) ==> ["ac", "bd"]
tf.reduce_join(a, 1) ==> ["ab", "cd"]
tf.reduce_join(a, -2) = tf.reduce_join(a, 0) ==> ["ac", "bd"]
tf.reduce_join(a, -1) = tf.reduce_join(a, 1) ==> ["ab", "cd"]
tf.reduce_join(a, 0, keep_dims=True) ==> [["ac", "bd"]]
tf.reduce_join(a, 1, keep_dims=True) ==> [["ab"], ["cd"]]
tf.reduce_join(a, 0, separator=".") ==> ["a.c", "b.d"]
tf.reduce_join(a, [0, 1]) ==> "acbd"
tf.reduce_join(a, [1, 0]) ==> "abcd"
tf.reduce_join(a, []) ==> [["a", "b"], ["c", "d"]]
tf.reduce_join(a) = tf.reduce_join(a, [1, 0]) ==> "abcd"
Args
inputs A Tensor of type string. The input to be joined. All reduced indices must have non-zero size.
reduction_indices A Tensor of type int32. The dimensions to reduce over. Dimensions are reduced in the order specified. Omitting reduction_indices is equivalent to passing [n-1, n-2, ..., 0]. Negative indices from -n to -1 are supported.
keep_dims An optional bool. Defaults to False. If True, retain reduced dimensions with length 1.
separator An optional string. Defaults to "". The separator to use when joining.
name A name for the operation (optional).
Returns A Tensor of type string. | tensorflow.raw_ops.reducejoin |
tf.raw_ops.RefEnter Creates or finds a child frame, and makes data available to the child frame. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.RefEnter
tf.raw_ops.RefEnter(
data, frame_name, is_constant=False, parallel_iterations=10, name=None
)
The unique frame_name is used by the Executor to identify frames. If is_constant is true, output is a constant in the child frame; otherwise it may be changed in the child frame. At most parallel_iterations iterations are run in parallel in the child frame.
Args
data A mutable Tensor. The tensor to be made available to the child frame.
frame_name A string. The name of the child frame.
is_constant An optional bool. Defaults to False. If true, the output is constant within the child frame.
parallel_iterations An optional int. Defaults to 10. The number of iterations allowed to run in parallel.
name A name for the operation (optional).
Returns A mutable Tensor. Has the same type as data. | tensorflow.raw_ops.refenter |
tf.raw_ops.RefExit Exits the current frame to its parent frame. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.RefExit
tf.raw_ops.RefExit(
data, name=None
)
Exit makes its input data available to the parent frame.
Args
data A mutable Tensor. The tensor to be made available to the parent frame.
name A name for the operation (optional).
Returns A mutable Tensor. Has the same type as data. | tensorflow.raw_ops.refexit |
tf.raw_ops.RefIdentity Return the same ref tensor as the input ref tensor. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.RefIdentity
tf.raw_ops.RefIdentity(
input, name=None
)
Args
input A mutable Tensor.
name A name for the operation (optional).
Returns A mutable Tensor. Has the same type as input. | tensorflow.raw_ops.refidentity |
tf.raw_ops.RefMerge Forwards the value of an available tensor from inputs to output. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.RefMerge
tf.raw_ops.RefMerge(
inputs, name=None
)
Merge waits for at least one of the tensors in inputs to become available. It is usually combined with Switch to implement branching. Merge forwards the first tensor for become available to output, and sets value_index to its index in inputs.
Args
inputs A list of at least 1 mutable Tensor objects with the same type. The input tensors, exactly one of which will become available.
name A name for the operation (optional).
Returns A tuple of Tensor objects (output, value_index). output A mutable Tensor. Has the same type as inputs.
value_index A Tensor of type int32. | tensorflow.raw_ops.refmerge |
tf.raw_ops.RefNextIteration Makes its input available to the next iteration. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.RefNextIteration
tf.raw_ops.RefNextIteration(
data, name=None
)
Args
data A mutable Tensor. The tensor to be made available to the next iteration.
name A name for the operation (optional).
Returns A mutable Tensor. Has the same type as data. | tensorflow.raw_ops.refnextiteration |
tf.raw_ops.RefSelect Forwards the indexth element of inputs to output. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.RefSelect
tf.raw_ops.RefSelect(
index, inputs, name=None
)
Args
index A Tensor of type int32. A scalar that determines the input that gets selected.
inputs A list of at least 1 mutable Tensor objects with the same type. A list of ref tensors, one of which will be forwarded to output.
name A name for the operation (optional).
Returns A mutable Tensor. Has the same type as inputs. | tensorflow.raw_ops.refselect |
tf.raw_ops.RefSwitch Forwards the ref tensor data to the output port determined by pred. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.RefSwitch
tf.raw_ops.RefSwitch(
data, pred, name=None
)
If pred is true, the data input is forwarded to output_true. Otherwise, the data goes to output_false. See also Switch and Merge.
Args
data A mutable Tensor. The ref tensor to be forwarded to the appropriate output.
pred A Tensor of type bool. A scalar that specifies which output port will receive data.
name A name for the operation (optional).
Returns A tuple of Tensor objects (output_false, output_true). output_false A mutable Tensor. Has the same type as data.
output_true A mutable Tensor. Has the same type as data. | tensorflow.raw_ops.refswitch |
tf.raw_ops.RegexFullMatch Check if the input matches the regex pattern. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.RegexFullMatch
tf.raw_ops.RegexFullMatch(
input, pattern, name=None
)
The input is a string tensor of any shape. The pattern is a scalar string tensor which is applied to every element of the input tensor. The boolean values (True or False) of the output tensor indicate if the input matches the regex pattern provided. The pattern follows the re2 syntax (https://github.com/google/re2/wiki/Syntax) Examples:
tf.strings.regex_full_match(["TF lib", "lib TF"], ".*lib$")
<tf.Tensor: shape=(2,), dtype=bool, numpy=array([ True, False])>
tf.strings.regex_full_match(["TF lib", "lib TF"], ".*TF$")
<tf.Tensor: shape=(2,), dtype=bool, numpy=array([False, True])>
Args
input A Tensor of type string. A string tensor of the text to be processed.
pattern A Tensor of type string. A scalar string tensor containing the regular expression to match the input.
name A name for the operation (optional).
Returns A Tensor of type bool. | tensorflow.raw_ops.regexfullmatch |
tf.raw_ops.RegexReplace Replaces matches of the pattern regular expression in input with the View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.RegexReplace
tf.raw_ops.RegexReplace(
input, pattern, rewrite, replace_global=True, name=None
)
replacement string provided in rewrite. It follows the re2 syntax (https://github.com/google/re2/wiki/Syntax) Args: input: A Tensor of type string. The text to be processed. pattern: A Tensor of type string. The regular expression to be matched in the input strings. rewrite: A Tensor of type string. The rewrite string to be substituted for the pattern expression where it is matched in the input strings. replace_global: An optional bool. Defaults to True. If True, the replacement is global (that is, all matches of the pattern regular expression in each input string are rewritten), otherwise the rewrite substitution is only made for the first pattern match. name: A name for the operation (optional). Returns: A Tensor of type string. | tensorflow.raw_ops.regexreplace |
tf.raw_ops.RegisterDataset Registers a dataset with the tf.data service. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.RegisterDataset
tf.raw_ops.RegisterDataset(
dataset, address, protocol, external_state_policy, name=None
)
Args
dataset A Tensor of type variant.
address A Tensor of type string.
protocol A Tensor of type string.
external_state_policy An int.
name A name for the operation (optional).
Returns A Tensor of type int64. | tensorflow.raw_ops.registerdataset |
tf.raw_ops.Relu Computes rectified linear: max(features, 0). View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.Relu
tf.raw_ops.Relu(
features, name=None
)
See: https://en.wikipedia.org/wiki/Rectifier_(neural_networks) Example usage: >>> tf.nn.relu([-2., 0., -0., 3.]).numpy()
array([ 0., 0., -0., 3.], dtype=float32)
Args
features A Tensor. Must be one of the following types: float32, float64, int32, uint8, int16, int8, int64, bfloat16, uint16, half, uint32, uint64, qint8.
name A name for the operation (optional).
Returns A Tensor. Has the same type as features. | tensorflow.raw_ops.relu |
tf.raw_ops.Relu6 Computes rectified linear 6: min(max(features, 0), 6). View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.Relu6
tf.raw_ops.Relu6(
features, name=None
)
Args
features A Tensor. Must be one of the following types: float32, float64, int32, uint8, int16, int8, int64, bfloat16, uint16, half, uint32, uint64.
name A name for the operation (optional).
Returns A Tensor. Has the same type as features. | tensorflow.raw_ops.relu6 |
tf.raw_ops.Relu6Grad Computes rectified linear 6 gradients for a Relu6 operation. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.Relu6Grad
tf.raw_ops.Relu6Grad(
gradients, features, name=None
)
Args
gradients A Tensor. Must be one of the following types: float32, float64, int32, uint8, int16, int8, int64, bfloat16, uint16, half, uint32, uint64. The backpropagated gradients to the corresponding Relu6 operation.
features A Tensor. Must have the same type as gradients. The features passed as input to the corresponding Relu6 operation, or its output; using either one produces the same result.
name A name for the operation (optional).
Returns A Tensor. Has the same type as gradients. | tensorflow.raw_ops.relu6grad |
tf.raw_ops.ReluGrad Computes rectified linear gradients for a Relu operation. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.ReluGrad
tf.raw_ops.ReluGrad(
gradients, features, name=None
)
Args
gradients A Tensor. Must be one of the following types: float32, float64, int32, uint8, int16, int8, int64, bfloat16, uint16, half, uint32, uint64. The backpropagated gradients to the corresponding Relu operation.
features A Tensor. Must have the same type as gradients. The features passed as input to the corresponding Relu operation, OR the outputs of that operation (both work equivalently).
name A name for the operation (optional).
Returns A Tensor. Has the same type as gradients. | tensorflow.raw_ops.relugrad |
tf.raw_ops.RemoteCall Runs function f on a remote device indicated by target. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.RemoteCall
tf.raw_ops.RemoteCall(
target, args, Tout, f, name=None
)
Args
target A Tensor of type string. A fully specified device name where we want to run the function.
args A list of Tensor objects. A list of arguments for the function.
Tout A list of tf.DTypes that has length >= 1. The type list for the return values.
f A function decorated with @Defun. The function to run remotely.
name A name for the operation (optional).
Returns A list of Tensor objects of type Tout. | tensorflow.raw_ops.remotecall |
tf.raw_ops.RepeatDataset Creates a dataset that emits the outputs of input_dataset count times. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.RepeatDataset
tf.raw_ops.RepeatDataset(
input_dataset, count, output_types, output_shapes, name=None
)
Args
input_dataset A Tensor of type variant.
count A Tensor of type int64. A scalar representing the number of times that input_dataset should be repeated. A value of -1 indicates that it should be repeated infinitely.
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.repeatdataset |
tf.raw_ops.RequantizationRange Computes a range that covers the actual values present in a quantized tensor. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.RequantizationRange
tf.raw_ops.RequantizationRange(
input, input_min, input_max, name=None
)
Given a quantized tensor described by (input, input_min, input_max), outputs a range that covers the actual values present in that tensor. This op is typically used to produce the requested_output_min and requested_output_max for Requantize.
Args
input A Tensor. Must be one of the following types: qint8, quint8, qint32, qint16, quint16.
input_min A Tensor of type float32. The float value that the minimum quantized input value represents.
input_max A Tensor of type float32. The float value that the maximum quantized input value represents.
name A name for the operation (optional).
Returns A tuple of Tensor objects (output_min, output_max). output_min A Tensor of type float32.
output_max A Tensor of type float32. | tensorflow.raw_ops.requantizationrange |
tf.raw_ops.RequantizationRangePerChannel Computes requantization range per channel. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.RequantizationRangePerChannel
tf.raw_ops.RequantizationRangePerChannel(
input, input_min, input_max, clip_value_max, name=None
)
Args
input A Tensor. Must be one of the following types: qint8, quint8, qint32, qint16, quint16. The original input tensor.
input_min A Tensor of type float32. The minimum value of the input tensor
input_max A Tensor of type float32. The maximum value of the input tensor.
clip_value_max A float. The maximum value of the output that needs to be clipped. Example: set this to 6 for Relu6.
name A name for the operation (optional).
Returns A tuple of Tensor objects (output_min, output_max). output_min A Tensor of type float32.
output_max A Tensor of type float32. | tensorflow.raw_ops.requantizationrangeperchannel |
tf.raw_ops.Requantize Converts the quantized input tensor into a lower-precision output. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.Requantize
tf.raw_ops.Requantize(
input, input_min, input_max, requested_output_min, requested_output_max,
out_type, name=None
)
Converts the quantized input tensor into a lower-precision output, using the output range specified with requested_output_min and requested_output_max. [input_min, input_max] are scalar floats that specify the range for the float interpretation of the input data. For example, if input_min is -1.0f and input_max is 1.0f, and we are dealing with quint16 quantized data, then a 0 value in the 16-bit data should be interpreted as -1.0f, and a 65535 means 1.0f.
Args
input A Tensor. Must be one of the following types: qint8, quint8, qint32, qint16, quint16.
input_min A Tensor of type float32. The float value that the minimum quantized input value represents.
input_max A Tensor of type float32. The float value that the maximum quantized input value represents.
requested_output_min A Tensor of type float32. The float value that the minimum quantized output value represents.
requested_output_max A Tensor of type float32. The float value that the maximum quantized output value represents.
out_type A tf.DType from: tf.qint8, tf.quint8, tf.qint32, tf.qint16, tf.quint16. The type of the output. Should be a lower bit depth than Tinput.
name A name for the operation (optional).
Returns A tuple of Tensor objects (output, output_min, output_max). output A Tensor of type out_type.
output_min A Tensor of type float32.
output_max A Tensor of type float32. | tensorflow.raw_ops.requantize |
tf.raw_ops.RequantizePerChannel Requantizes input with min and max values known per channel. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.RequantizePerChannel
tf.raw_ops.RequantizePerChannel(
input, input_min, input_max, requested_output_min, requested_output_max,
out_type=tf.dtypes.quint8, name=None
)
Args
input A Tensor. Must be one of the following types: qint8, quint8, qint32, qint16, quint16. The original input tensor.
input_min A Tensor of type float32. The minimum value of the input tensor
input_max A Tensor of type float32. The maximum value of the input tensor.
requested_output_min A Tensor of type float32. The minimum value of the output tensor requested.
requested_output_max A Tensor of type float32. The maximum value of the output tensor requested.
out_type An optional tf.DType from: tf.qint8, tf.quint8, tf.qint32, tf.qint16, tf.quint16. Defaults to tf.quint8. The quantized type of output tensor that needs to be converted.
name A name for the operation (optional).
Returns A tuple of Tensor objects (output, output_min, output_max). output A Tensor of type out_type.
output_min A Tensor of type float32.
output_max A Tensor of type float32. | tensorflow.raw_ops.requantizeperchannel |
tf.raw_ops.Reshape Reshapes a tensor. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.Reshape
tf.raw_ops.Reshape(
tensor, shape, name=None
)
Given tensor, this operation returns a tensor that has the same values as tensor with shape shape. If one component of 1-D tensor shape is the special value -1, the size of that dimension is computed so that the total size remains constant. In particular, a shape of [-1] flattens into 1-D. At most one component of shape may be unknown. The shape must be 1-D and the operation returns a tensor with shape shape filled with the values of tensor. In this case, the number of elements implied by shape must be the same as the number of elements in tensor. It is an error if shape is not 1-D. For example: # tensor 't' is [1, 2, 3, 4, 5, 6, 7, 8, 9]
# tensor 't' has shape [9]
reshape(t, [3, 3]) ==> [[1, 2, 3],
[4, 5, 6],
[7, 8, 9]]
# tensor 't' is [[[1, 1], [2, 2]],
# [[3, 3], [4, 4]]]
# tensor 't' has shape [2, 2, 2]
reshape(t, [2, 4]) ==> [[1, 1, 2, 2],
[3, 3, 4, 4]]
# tensor 't' is [[[1, 1, 1],
# [2, 2, 2]],
# [[3, 3, 3],
# [4, 4, 4]],
# [[5, 5, 5],
# [6, 6, 6]]]
# tensor 't' has shape [3, 2, 3]
# pass '[-1]' to flatten 't'
reshape(t, [-1]) ==> [1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6]
# -1 can also be used to infer the shape
# -1 is inferred to be 9:
reshape(t, [2, -1]) ==> [[1, 1, 1, 2, 2, 2, 3, 3, 3],
[4, 4, 4, 5, 5, 5, 6, 6, 6]]
# -1 is inferred to be 2:
reshape(t, [-1, 9]) ==> [[1, 1, 1, 2, 2, 2, 3, 3, 3],
[4, 4, 4, 5, 5, 5, 6, 6, 6]]
# -1 is inferred to be 3:
reshape(t, [ 2, -1, 3]) ==> [[[1, 1, 1],
[2, 2, 2],
[3, 3, 3]],
[[4, 4, 4],
[5, 5, 5],
[6, 6, 6]]]
# tensor 't' is [7]
# shape `[]` reshapes to a scalar
reshape(t, []) ==> 7
Args
tensor A Tensor.
shape A Tensor. Must be one of the following types: int32, int64. Defines the shape of the output tensor.
name A name for the operation (optional).
Returns A Tensor. Has the same type as tensor. | tensorflow.raw_ops.reshape |
tf.raw_ops.ResizeArea Resize images to size using area interpolation. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.ResizeArea
tf.raw_ops.ResizeArea(
images, size, align_corners=False, name=None
)
Input images can be of different types but output images are always float. The range of pixel values for the output image might be slightly different from the range for the input image because of limited numerical precision. To guarantee an output range, for example [0.0, 1.0], apply tf.clip_by_value to the output. Each output pixel is computed by first transforming the pixel's footprint into the input tensor and then averaging the pixels that intersect the footprint. An input pixel's contribution to the average is weighted by the fraction of its area that intersects the footprint. This is the same as OpenCV's INTER_AREA.
Args
images A Tensor. Must be one of the following types: int8, uint8, int16, uint16, int32, int64, half, float32, float64, bfloat16. 4-D with shape [batch, height, width, channels].
size A 1-D int32 Tensor of 2 elements: new_height, new_width. The new size for the images.
align_corners An optional bool. Defaults to False. If true, the centers of the 4 corner pixels of the input and output tensors are aligned, preserving the values at the corner pixels. Defaults to false.
name A name for the operation (optional).
Returns A Tensor of type float32. | tensorflow.raw_ops.resizearea |
tf.raw_ops.ResizeBicubic Resize images to size using bicubic interpolation. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.ResizeBicubic
tf.raw_ops.ResizeBicubic(
images, size, align_corners=False, half_pixel_centers=False, name=None
)
Input images can be of different types but output images are always float.
Args
images A Tensor. Must be one of the following types: int8, uint8, int16, uint16, int32, int64, half, float32, float64, bfloat16. 4-D with shape [batch, height, width, channels].
size A 1-D int32 Tensor of 2 elements: new_height, new_width. The new size for the images.
align_corners An optional bool. Defaults to False. If true, the centers of the 4 corner pixels of the input and output tensors are aligned, preserving the values at the corner pixels. Defaults to false.
half_pixel_centers An optional bool. Defaults to False.
name A name for the operation (optional).
Returns A Tensor of type float32. | tensorflow.raw_ops.resizebicubic |
tf.raw_ops.ResizeBicubicGrad Computes the gradient of bicubic interpolation. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.ResizeBicubicGrad
tf.raw_ops.ResizeBicubicGrad(
grads, original_image, align_corners=False, half_pixel_centers=False, name=None
)
Args
grads A Tensor of type float32. 4-D with shape [batch, height, width, channels].
original_image A Tensor. Must be one of the following types: float32, float64. 4-D with shape [batch, orig_height, orig_width, channels], The image tensor that was resized.
align_corners An optional bool. Defaults to False. If true, the centers of the 4 corner pixels of the input and grad tensors are aligned. Defaults to false.
half_pixel_centers An optional bool. Defaults to False.
name A name for the operation (optional).
Returns A Tensor. Has the same type as original_image. | tensorflow.raw_ops.resizebicubicgrad |
tf.raw_ops.ResizeBilinear Resize images to size using bilinear interpolation. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.ResizeBilinear
tf.raw_ops.ResizeBilinear(
images, size, align_corners=False, half_pixel_centers=False, name=None
)
Input images can be of different types but output images are always float.
Args
images A Tensor. Must be one of the following types: int8, uint8, int16, uint16, int32, int64, bfloat16, half, float32, float64, bfloat16. 4-D with shape [batch, height, width, channels].
size A 1-D int32 Tensor of 2 elements: new_height, new_width. The new size for the images.
align_corners An optional bool. Defaults to False. If true, the centers of the 4 corner pixels of the input and output tensors are aligned, preserving the values at the corner pixels. Defaults to false.
half_pixel_centers An optional bool. Defaults to False.
name A name for the operation (optional).
Returns A Tensor of type float32. | tensorflow.raw_ops.resizebilinear |
tf.raw_ops.ResizeBilinearGrad Computes the gradient of bilinear interpolation. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.ResizeBilinearGrad
tf.raw_ops.ResizeBilinearGrad(
grads, original_image, align_corners=False, half_pixel_centers=False, name=None
)
Args
grads A Tensor of type float32. 4-D with shape [batch, height, width, channels].
original_image A Tensor. Must be one of the following types: float32, bfloat16, half, float64. 4-D with shape [batch, orig_height, orig_width, channels], The image tensor that was resized.
align_corners An optional bool. Defaults to False. If true, the centers of the 4 corner pixels of the input and grad tensors are aligned. Defaults to false.
half_pixel_centers An optional bool. Defaults to False.
name A name for the operation (optional).
Returns A Tensor. Has the same type as original_image. | tensorflow.raw_ops.resizebilineargrad |
tf.raw_ops.ResizeNearestNeighbor Resize images to size using nearest neighbor interpolation. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.ResizeNearestNeighbor
tf.raw_ops.ResizeNearestNeighbor(
images, size, align_corners=False, half_pixel_centers=False, name=None
)
Args
images A Tensor. Must be one of the following types: int8, uint8, int16, uint16, int32, int64, half, float32, float64, bfloat16. 4-D with shape [batch, height, width, channels].
size A 1-D int32 Tensor of 2 elements: new_height, new_width. The new size for the images.
align_corners An optional bool. Defaults to False. If true, the centers of the 4 corner pixels of the input and output tensors are aligned, preserving the values at the corner pixels. Defaults to false.
half_pixel_centers An optional bool. Defaults to False.
name A name for the operation (optional).
Returns A Tensor. Has the same type as images. | tensorflow.raw_ops.resizenearestneighbor |
tf.raw_ops.ResizeNearestNeighborGrad Computes the gradient of nearest neighbor interpolation. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.ResizeNearestNeighborGrad
tf.raw_ops.ResizeNearestNeighborGrad(
grads, size, align_corners=False, half_pixel_centers=False, name=None
)
Args
grads A Tensor. Must be one of the following types: uint8, int8, int32, half, float32, float64. 4-D with shape [batch, height, width, channels].
size A 1-D int32 Tensor of 2 elements: orig_height, orig_width. The original input size.
align_corners An optional bool. Defaults to False. If true, the centers of the 4 corner pixels of the input and grad tensors are aligned. Defaults to false.
half_pixel_centers An optional bool. Defaults to False.
name A name for the operation (optional).
Returns A Tensor. Has the same type as grads. | tensorflow.raw_ops.resizenearestneighborgrad |
tf.raw_ops.ResourceAccumulatorApplyGradient Applies a gradient to a given accumulator. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.ResourceAccumulatorApplyGradient
tf.raw_ops.ResourceAccumulatorApplyGradient(
handle, local_step, gradient, name=None
)
Does not add if local_step is lesser than the accumulator's global_step.
Args
handle A Tensor of type resource. The handle to a accumulator.
local_step A Tensor of type int64. The local_step value at which the gradient was computed.
gradient A Tensor. Must be one of the following types: float32, float64, int32, uint8, int16, int8, complex64, int64, qint8, quint8, qint32, bfloat16, uint16, complex128, half, uint32, uint64. A tensor of the gradient to be accumulated.
name A name for the operation (optional).
Returns The created Operation. | tensorflow.raw_ops.resourceaccumulatorapplygradient |
tf.raw_ops.ResourceAccumulatorNumAccumulated Returns the number of gradients aggregated in the given accumulators. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.ResourceAccumulatorNumAccumulated
tf.raw_ops.ResourceAccumulatorNumAccumulated(
handle, name=None
)
Args
handle A Tensor of type resource. The handle to an accumulator.
name A name for the operation (optional).
Returns A Tensor of type int32. | tensorflow.raw_ops.resourceaccumulatornumaccumulated |
tf.raw_ops.ResourceAccumulatorSetGlobalStep Updates the accumulator with a new value for global_step. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.ResourceAccumulatorSetGlobalStep
tf.raw_ops.ResourceAccumulatorSetGlobalStep(
handle, new_global_step, name=None
)
Logs warning if the accumulator's value is already higher than new_global_step.
Args
handle A Tensor of type resource. The handle to an accumulator.
new_global_step A Tensor of type int64. The new global_step value to set.
name A name for the operation (optional).
Returns The created Operation. | tensorflow.raw_ops.resourceaccumulatorsetglobalstep |
tf.raw_ops.ResourceAccumulatorTakeGradient Extracts the average gradient in the given ConditionalAccumulator. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.ResourceAccumulatorTakeGradient
tf.raw_ops.ResourceAccumulatorTakeGradient(
handle, num_required, dtype, name=None
)
The op blocks until sufficient (i.e., more than num_required) gradients have been accumulated. If the accumulator has already aggregated more than num_required gradients, it returns the average of the accumulated gradients. Also automatically increments the recorded global_step in the accumulator by 1, and resets the aggregate to 0.
Args
handle A Tensor of type resource. The handle to an accumulator.
num_required A Tensor of type int32. Number of gradients required before we return an aggregate.
dtype A tf.DType from: tf.float32, tf.float64, tf.int32, tf.uint8, tf.int16, tf.int8, tf.complex64, tf.int64, tf.qint8, tf.quint8, tf.qint32, tf.bfloat16, tf.uint16, tf.complex128, tf.half, tf.uint32, tf.uint64. The data type of accumulated gradients. Needs to correspond to the type of the accumulator.
name A name for the operation (optional).
Returns A Tensor of type dtype. | tensorflow.raw_ops.resourceaccumulatortakegradient |
tf.raw_ops.ResourceApplyAdadelta Update '*var' according to the adadelta scheme. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.ResourceApplyAdadelta
tf.raw_ops.ResourceApplyAdadelta(
var, accum, accum_update, lr, rho, epsilon, grad, use_locking=False, name=None
)
accum = rho() * accum + (1 - rho()) * grad.square(); update = (update_accum + epsilon).sqrt() * (accum + epsilon()).rsqrt() * grad; update_accum = rho() * update_accum + (1 - rho()) * update.square(); var -= update;
Args
var A Tensor of type resource. Should be from a Variable().
accum A Tensor of type resource. Should be from a Variable().
accum_update A Tensor of type resource. Should be from a Variable().
lr A Tensor. Must be one of the following types: float32, float64, int32, uint8, int16, int8, complex64, int64, qint8, quint8, qint32, bfloat16, uint16, complex128, half, uint32, uint64. Scaling factor. Must be a scalar.
rho A Tensor. Must have the same type as lr. Decay factor. Must be a scalar.
epsilon A Tensor. Must have the same type as lr. Constant factor. Must be a scalar.
grad A Tensor. Must have the same type as lr. The gradient.
use_locking An optional bool. Defaults to False. If True, updating of the var, accum and update_accum tensors will be protected by a lock; otherwise the behavior is undefined, but may exhibit less contention.
name A name for the operation (optional).
Returns The created Operation. | tensorflow.raw_ops.resourceapplyadadelta |
tf.raw_ops.ResourceApplyAdagrad Update '*var' according to the adagrad scheme. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.ResourceApplyAdagrad
tf.raw_ops.ResourceApplyAdagrad(
var, accum, lr, grad, use_locking=False, update_slots=True, name=None
)
accum += grad * grad var -= lr * grad * (1 / sqrt(accum))
Args
var A Tensor of type resource. Should be from a Variable().
accum A Tensor of type resource. Should be from a Variable().
lr A Tensor. Must be one of the following types: float32, float64, int32, uint8, int16, int8, complex64, int64, qint8, quint8, qint32, bfloat16, uint16, complex128, half, uint32, uint64. Scaling factor. Must be a scalar.
grad A Tensor. Must have the same type as lr. The gradient.
use_locking An optional bool. Defaults to False. If True, updating of the var and accum tensors will be protected by a lock; otherwise the behavior is undefined, but may exhibit less contention.
update_slots An optional bool. Defaults to True.
name A name for the operation (optional).
Returns The created Operation. | tensorflow.raw_ops.resourceapplyadagrad |
tf.raw_ops.ResourceApplyAdagradDA Update '*var' according to the proximal adagrad scheme. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.ResourceApplyAdagradDA
tf.raw_ops.ResourceApplyAdagradDA(
var, gradient_accumulator, gradient_squared_accumulator, grad, lr, l1, l2,
global_step, use_locking=False, name=None
)
Args
var A Tensor of type resource. Should be from a Variable().
gradient_accumulator A Tensor of type resource. Should be from a Variable().
gradient_squared_accumulator A Tensor of type resource. Should be from a Variable().
grad A Tensor. Must be one of the following types: float32, float64, int32, uint8, int16, int8, complex64, int64, qint8, quint8, qint32, bfloat16, uint16, complex128, half, uint32, uint64. The gradient.
lr A Tensor. Must have the same type as grad. Scaling factor. Must be a scalar.
l1 A Tensor. Must have the same type as grad. L1 regularization. Must be a scalar.
l2 A Tensor. Must have the same type as grad. L2 regularization. Must be a scalar.
global_step A Tensor of type int64. Training step number. Must be a scalar.
use_locking An optional bool. Defaults to False. If True, updating of the var and accum tensors will be protected by a lock; otherwise the behavior is undefined, but may exhibit less contention.
name A name for the operation (optional).
Returns The created Operation. | tensorflow.raw_ops.resourceapplyadagradda |
tf.raw_ops.ResourceApplyAdagradV2 Update '*var' according to the adagrad scheme. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.ResourceApplyAdagradV2
tf.raw_ops.ResourceApplyAdagradV2(
var, accum, lr, epsilon, grad, use_locking=False, update_slots=True, name=None
)
accum += grad * grad var -= lr * grad * (1 / (sqrt(accum) + epsilon))
Args
var A Tensor of type resource. Should be from a Variable().
accum A Tensor of type resource. Should be from a Variable().
lr A Tensor. Must be one of the following types: float32, float64, int32, uint8, int16, int8, complex64, int64, qint8, quint8, qint32, bfloat16, uint16, complex128, half, uint32, uint64. Scaling factor. Must be a scalar.
epsilon A Tensor. Must have the same type as lr. Constant factor. Must be a scalar.
grad A Tensor. Must have the same type as lr. The gradient.
use_locking An optional bool. Defaults to False. If True, updating of the var and accum tensors will be protected by a lock; otherwise the behavior is undefined, but may exhibit less contention.
update_slots An optional bool. Defaults to True.
name A name for the operation (optional).
Returns The created Operation. | tensorflow.raw_ops.resourceapplyadagradv2 |
tf.raw_ops.ResourceApplyAdam Update '*var' according to the Adam algorithm. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.ResourceApplyAdam
tf.raw_ops.ResourceApplyAdam(
var, m, v, beta1_power, beta2_power, lr, beta1, beta2, epsilon, grad,
use_locking=False, use_nesterov=False, name=None
)
$$\text{lr}_t := \mathrm{learning_rate} * \sqrt{1 - \beta_2^t} / (1 - \beta_1^t)$$ $$m_t := \beta_1 * m_{t-1} + (1 - \beta_1) * g$$ $$v_t := \beta_2 * v_{t-1} + (1 - \beta_2) * g * g$$ $$\text{variable} := \text{variable} - \text{lr}_t * m_t / (\sqrt{v_t} + \epsilon)$$
Args
var A Tensor of type resource. Should be from a Variable().
m A Tensor of type resource. Should be from a Variable().
v A Tensor of type resource. Should be from a Variable().
beta1_power A Tensor. Must be one of the following types: float32, float64, int32, uint8, int16, int8, complex64, int64, qint8, quint8, qint32, bfloat16, uint16, complex128, half, uint32, uint64. Must be a scalar.
beta2_power A Tensor. Must have the same type as beta1_power. Must be a scalar.
lr A Tensor. Must have the same type as beta1_power. Scaling factor. Must be a scalar.
beta1 A Tensor. Must have the same type as beta1_power. Momentum factor. Must be a scalar.
beta2 A Tensor. Must have the same type as beta1_power. Momentum factor. Must be a scalar.
epsilon A Tensor. Must have the same type as beta1_power. Ridge term. Must be a scalar.
grad A Tensor. Must have the same type as beta1_power. The gradient.
use_locking An optional bool. Defaults to False. If True, updating of the var, m, and v tensors will be protected by a lock; otherwise the behavior is undefined, but may exhibit less contention.
use_nesterov An optional bool. Defaults to False. If True, uses the nesterov update.
name A name for the operation (optional).
Returns The created Operation. | tensorflow.raw_ops.resourceapplyadam |
tf.raw_ops.ResourceApplyAdaMax Update '*var' according to the AdaMax algorithm. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.ResourceApplyAdaMax
tf.raw_ops.ResourceApplyAdaMax(
var, m, v, beta1_power, lr, beta1, beta2, epsilon, grad, use_locking=False,
name=None
)
mt <- beta1 * m{t-1} + (1 - beta1) * g vt <- max(beta2 * v{t-1}, abs(g)) variable <- variable - learning_rate / (1 - beta1^t) * m_t / (v_t + epsilon)
Args
var A Tensor of type resource. Should be from a Variable().
m A Tensor of type resource. Should be from a Variable().
v A Tensor of type resource. Should be from a Variable().
beta1_power A Tensor. Must be one of the following types: float32, float64, int32, uint8, int16, int8, complex64, int64, qint8, quint8, qint32, bfloat16, uint16, complex128, half, uint32, uint64. Must be a scalar.
lr A Tensor. Must have the same type as beta1_power. Scaling factor. Must be a scalar.
beta1 A Tensor. Must have the same type as beta1_power. Momentum factor. Must be a scalar.
beta2 A Tensor. Must have the same type as beta1_power. Momentum factor. Must be a scalar.
epsilon A Tensor. Must have the same type as beta1_power. Ridge term. Must be a scalar.
grad A Tensor. Must have the same type as beta1_power. The gradient.
use_locking An optional bool. Defaults to False. If True, updating of the var, m, and v tensors will be protected by a lock; otherwise the behavior is undefined, but may exhibit less contention.
name A name for the operation (optional).
Returns The created Operation. | tensorflow.raw_ops.resourceapplyadamax |
tf.raw_ops.ResourceApplyAdamWithAmsgrad Update '*var' according to the Adam algorithm. View aliases Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.ResourceApplyAdamWithAmsgrad
tf.raw_ops.ResourceApplyAdamWithAmsgrad(
var, m, v, vhat, beta1_power, beta2_power, lr, beta1, beta2, epsilon, grad,
use_locking=False, name=None
)
$$\text{lr}_t := \mathrm{learning_rate} * \sqrt{1 - \beta_2^t} / (1 - \beta_1^t)$$ $$m_t := \beta_1 * m_{t-1} + (1 - \beta_1) * g$$ $$v_t := \beta_2 * v_{t-1} + (1 - \beta_2) * g * g$$ $$\hat{v}_t := max{\hat{v}_{t-1}, v_t}$$ $$\text{variable} := \text{variable} - \text{lr}_t * m_t / (\sqrt{\hat{v}_t} + \epsilon)$$
Args
var A Tensor of type resource. Should be from a Variable().
m A Tensor of type resource. Should be from a Variable().
v A Tensor of type resource. Should be from a Variable().
vhat A Tensor of type resource. Should be from a Variable().
beta1_power A Tensor. Must be one of the following types: float32, float64, int32, uint8, int16, int8, complex64, int64, qint8, quint8, qint32, bfloat16, uint16, complex128, half, uint32, uint64. Must be a scalar.
beta2_power A Tensor. Must have the same type as beta1_power. Must be a scalar.
lr A Tensor. Must have the same type as beta1_power. Scaling factor. Must be a scalar.
beta1 A Tensor. Must have the same type as beta1_power. Momentum factor. Must be a scalar.
beta2 A Tensor. Must have the same type as beta1_power. Momentum factor. Must be a scalar.
epsilon A Tensor. Must have the same type as beta1_power. Ridge term. Must be a scalar.
grad A Tensor. Must have the same type as beta1_power. The gradient.
use_locking An optional bool. Defaults to False. If True, updating of the var, m, and v tensors will be protected by a lock; otherwise the behavior is undefined, but may exhibit less contention.
name A name for the operation (optional).
Returns The created Operation. | tensorflow.raw_ops.resourceapplyadamwithamsgrad |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.