doc_content
stringlengths
1
386k
doc_id
stringlengths
5
188
tf.raw_ops.CollectiveGatherV2 Mutually accumulates multiple tensors of identical type and shape. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.CollectiveGatherV2 tf.raw_ops.CollectiveGatherV2( input, group_size, group_key, instance_key, communication_hint='auto', timeout_seconds=0, name=None ) Args input A Tensor. Must be one of the following types: float32, half, float64, int32, int64. group_size A Tensor of type int32. group_key A Tensor of type int32. instance_key A Tensor of type int32. communication_hint An optional string. Defaults to "auto". timeout_seconds An optional float. Defaults to 0. name A name for the operation (optional). Returns A Tensor. Has the same type as input.
tensorflow.raw_ops.collectivegatherv2
tf.raw_ops.CollectivePermute An Op to permute tensors across replicated TPU instances. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.CollectivePermute tf.raw_ops.CollectivePermute( input, source_target_pairs, name=None ) Each instance supplies its own input. For example, suppose there are 4 TPU instances: [A, B, C, D]. Passing source_target_pairs=[[0,1],[1,2],[2,3],[3,0]] gets the outputs: [D, A, B, C]. Args input A Tensor. Must be one of the following types: float32, float64, int32, uint8, int16, int8, complex64, int64, qint8, quint8, qint32, bfloat16, uint16, complex128, half, uint32, uint64. The local input to be permuted. Currently only supports float and bfloat16. source_target_pairs A Tensor of type int32. A tensor with shape [num_pairs, 2]. name A name for the operation (optional). Returns A Tensor. Has the same type as input.
tensorflow.raw_ops.collectivepermute
tf.raw_ops.CollectiveReduce Mutually reduces multiple tensors of identical type and shape. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.CollectiveReduce tf.raw_ops.CollectiveReduce( input, group_size, group_key, instance_key, merge_op, final_op, subdiv_offsets, wait_for=[], communication_hint='auto', timeout_seconds=0, name=None ) Args input A Tensor. Must be one of the following types: float32, half, float64, int32, int64. group_size An int. group_key An int. instance_key An int. merge_op A string from: "Min", "Max", "Mul", "Add". final_op A string from: "Id", "Div". subdiv_offsets A list of ints. wait_for An optional list of ints. Defaults to []. communication_hint An optional string. Defaults to "auto". timeout_seconds An optional float. Defaults to 0. name A name for the operation (optional). Returns A Tensor. Has the same type as input.
tensorflow.raw_ops.collectivereduce
tf.raw_ops.CollectiveReduceV2 Mutually reduces multiple tensors of identical type and shape. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.CollectiveReduceV2 tf.raw_ops.CollectiveReduceV2( input, group_size, group_key, instance_key, merge_op, final_op, communication_hint='auto', timeout_seconds=0, name=None ) Args input A Tensor. Must be one of the following types: float32, half, float64, int32, int64. group_size A Tensor of type int32. group_key A Tensor of type int32. instance_key A Tensor of type int32. merge_op A string from: "Min", "Max", "Mul", "Add". final_op A string from: "Id", "Div". communication_hint An optional string. Defaults to "auto". timeout_seconds An optional float. Defaults to 0. name A name for the operation (optional). Returns A Tensor. Has the same type as input.
tensorflow.raw_ops.collectivereducev2
tf.raw_ops.CombinedNonMaxSuppression Greedily selects a subset of bounding boxes in descending order of score, View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.CombinedNonMaxSuppression tf.raw_ops.CombinedNonMaxSuppression( boxes, scores, max_output_size_per_class, max_total_size, iou_threshold, score_threshold, pad_per_class=False, clip_boxes=True, name=None ) This operation performs non_max_suppression on the inputs per batch, across all classes. Prunes away boxes that have high intersection-over-union (IOU) overlap with previously selected boxes. Bounding boxes are supplied as [y1, x1, y2, x2], where (y1, x1) and (y2, x2) are the coordinates of any diagonal pair of box corners and the coordinates can be provided as normalized (i.e., lying in the interval [0, 1]) or absolute. Note that this algorithm is agnostic to where the origin is in the coordinate system. Also note that this algorithm is invariant to orthogonal transformations and translations of the coordinate system; thus translating or reflections of the coordinate system result in the same boxes being selected by the algorithm. The output of this operation is the final boxes, scores and classes tensor returned after performing non_max_suppression. Args boxes A Tensor of type float32. A 4-D float tensor of shape [batch_size, num_boxes, q, 4]. If q is 1 then same boxes are used for all classes otherwise, if q is equal to number of classes, class-specific boxes are used. scores A Tensor of type float32. A 3-D float tensor of shape [batch_size, num_boxes, num_classes] representing a single score corresponding to each box (each row of boxes). max_output_size_per_class A Tensor of type int32. A scalar integer tensor representing the maximum number of boxes to be selected by non max suppression per class max_total_size A Tensor of type int32. A scalar representing maximum number of boxes retained over all classes. iou_threshold A Tensor of type float32. A 0-D float tensor representing the threshold for deciding whether boxes overlap too much with respect to IOU. score_threshold A Tensor of type float32. A 0-D float tensor representing the threshold for deciding when to remove boxes based on score. pad_per_class An optional bool. Defaults to False. If false, the output nmsed boxes, scores and classes are padded/clipped to max_total_size. If true, the output nmsed boxes, scores and classes are padded to be of length max_size_per_class*num_classes, unless it exceeds max_total_size in which case it is clipped to max_total_size. Defaults to false. clip_boxes An optional bool. Defaults to True. If true, assume the box coordinates are between [0, 1] and clip the output boxes if they fall beyond [0, 1]. If false, do not do clipping and output the box coordinates as it is. name A name for the operation (optional). Returns A tuple of Tensor objects (nmsed_boxes, nmsed_scores, nmsed_classes, valid_detections). nmsed_boxes A Tensor of type float32. nmsed_scores A Tensor of type float32. nmsed_classes A Tensor of type float32. valid_detections A Tensor of type int32.
tensorflow.raw_ops.combinednonmaxsuppression
tf.raw_ops.CompareAndBitpack Compare values of input to threshold and pack resulting bits into a uint8. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.CompareAndBitpack tf.raw_ops.CompareAndBitpack( input, threshold, name=None ) Each comparison returns a boolean true (if input_value > threshold) or and false otherwise. This operation is useful for Locality-Sensitive-Hashing (LSH) and other algorithms that use hashing approximations of cosine and L2 distances; codes can be generated from an input via: codebook_size = 50 codebook_bits = codebook_size * 32 codebook = tf.get_variable('codebook', [x.shape[-1].value, codebook_bits], dtype=x.dtype, initializer=tf.orthogonal_initializer()) codes = compare_and_threshold(tf.matmul(x, codebook), threshold=0.) codes = tf.bitcast(codes, tf.int32) # go from uint8 to int32 # now codes has shape x.shape[:-1] + [codebook_size] Note: Currently, the innermost dimension of the tensor must be divisible by 8. Given an input shaped [s0, s1, ..., s_n], the output is a uint8 tensor shaped [s0, s1, ..., s_n / 8]. Args input A Tensor. Must be one of the following types: bool, half, float32, float64, int8, int16, int32, int64. Values to compare against threshold and bitpack. threshold A Tensor. Must have the same type as input. Threshold to compare against. name A name for the operation (optional). Returns A Tensor of type uint8.
tensorflow.raw_ops.compareandbitpack
tf.raw_ops.Complex Converts two real numbers to a complex number. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.Complex tf.raw_ops.Complex( real, imag, Tout=tf.dtypes.complex64, name=None ) Given a tensor real representing the real part of a complex number, and a tensor imag representing the imaginary part of a complex number, this operation returns complex numbers elementwise of the form \(a + bj\), where a represents the real part and b represents the imag part. The input tensors real and imag must have the same shape. For example: # tensor 'real' is [2.25, 3.25] # tensor `imag` is [4.75, 5.75] tf.complex(real, imag) ==> [[2.25 + 4.75j], [3.25 + 5.75j]] Args real A Tensor. Must be one of the following types: float32, float64. imag A Tensor. Must have the same type as real. Tout An optional tf.DType from: tf.complex64, tf.complex128. Defaults to tf.complex64. name A name for the operation (optional). Returns A Tensor of type Tout.
tensorflow.raw_ops.complex
tf.raw_ops.ComplexAbs Computes the complex absolute value of a tensor. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.ComplexAbs tf.raw_ops.ComplexAbs( x, Tout=tf.dtypes.float32, name=None ) Given a tensor x of complex numbers, this operation returns a tensor of type float or double that is the absolute value of each element in x. All elements in x must be complex numbers of the form \(a + bj\). The absolute value is computed as \( \sqrt{a^2 + b^2}\). Args x 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.complexabs
tf.raw_ops.CompressElement Compresses a dataset element. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.CompressElement tf.raw_ops.CompressElement( components, name=None ) Args components A list of Tensor objects. name A name for the operation (optional). Returns A Tensor of type variant.
tensorflow.raw_ops.compresselement
tf.raw_ops.ComputeAccidentalHits Computes the ids of the positions in sampled_candidates that match true_labels. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.ComputeAccidentalHits tf.raw_ops.ComputeAccidentalHits( true_classes, sampled_candidates, num_true, seed=0, seed2=0, name=None ) When doing log-odds NCE, the result of this op should be passed through a SparseToDense op, then added to the logits of the sampled candidates. This has the effect of 'removing' the sampled labels that match the true labels by making the classifier sure that they are sampled labels. Args true_classes A Tensor of type int64. The true_classes output of UnpackSparseLabels. sampled_candidates A Tensor of type int64. The sampled_candidates output of CandidateSampler. num_true An int. Number of true labels per context. seed An optional int. Defaults to 0. If either seed or seed2 are set to be non-zero, the random number generator is seeded by the given seed. Otherwise, it is seeded by a random seed. seed2 An optional int. Defaults to 0. An second seed to avoid seed collision. name A name for the operation (optional). Returns A tuple of Tensor objects (indices, ids, weights). indices A Tensor of type int32. ids A Tensor of type int64. weights A Tensor of type float32.
tensorflow.raw_ops.computeaccidentalhits
tf.raw_ops.ComputeBatchSize Computes the static batch size of a dataset sans partial batches. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.ComputeBatchSize tf.raw_ops.ComputeBatchSize( input_dataset, name=None ) Args input_dataset A Tensor of type variant. name A name for the operation (optional). Returns A Tensor of type int64.
tensorflow.raw_ops.computebatchsize
tf.raw_ops.Concat Concatenates tensors along one dimension. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.Concat tf.raw_ops.Concat( concat_dim, values, name=None ) Args concat_dim A Tensor of type int32. 0-D. The dimension along which to concatenate. Must be in the range [0, rank(values)). values A list of at least 2 Tensor objects with the same type. The N Tensors to concatenate. Their ranks and types must match, and their sizes must match in all dimensions except concat_dim. name A name for the operation (optional). Returns A Tensor. Has the same type as values.
tensorflow.raw_ops.concat
tf.raw_ops.ConcatenateDataset Creates a dataset that concatenates input_dataset with another_dataset. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.ConcatenateDataset tf.raw_ops.ConcatenateDataset( input_dataset, another_dataset, output_types, output_shapes, name=None ) Args input_dataset A Tensor of type variant. another_dataset A Tensor of type variant. output_types A list of tf.DTypes that has length >= 1. output_shapes A list of shapes (each a tf.TensorShape or list of ints) that has length >= 1. name A name for the operation (optional). Returns A Tensor of type variant.
tensorflow.raw_ops.concatenatedataset
tf.raw_ops.ConcatOffset Computes offsets of concat inputs within its output. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.ConcatOffset tf.raw_ops.ConcatOffset( concat_dim, shape, name=None ) For example: # 'x' is [2, 2, 7] # 'y' is [2, 3, 7] # 'z' is [2, 5, 7] concat_offset(2, [x, y, z]) => [0, 0, 0], [0, 2, 0], [0, 5, 0] This is typically used by gradient computations for a concat operation. Args concat_dim A Tensor of type int32. The dimension along which to concatenate. shape A list of at least 2 Tensor objects with type int32. The N int32 vectors representing shape of tensors being concatenated. name A name for the operation (optional). Returns A list with the same length as shape of Tensor objects with type int32.
tensorflow.raw_ops.concatoffset
tf.raw_ops.ConcatV2 Concatenates tensors along one dimension. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.ConcatV2 tf.raw_ops.ConcatV2( values, axis, name=None ) Args values A list of at least 2 Tensor objects with the same type. List of N Tensors to concatenate. Their ranks and types must match, and their sizes must match in all dimensions except concat_dim. axis A Tensor. Must be one of the following types: int32, int64. 0-D. The dimension along which to concatenate. Must be in the range [-rank(values), rank(values)). name A name for the operation (optional). Returns A Tensor. Has the same type as values.
tensorflow.raw_ops.concatv2
tf.raw_ops.ConditionalAccumulator A conditional accumulator for aggregating gradients. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.ConditionalAccumulator tf.raw_ops.ConditionalAccumulator( dtype, shape, container='', shared_name='', reduction_type='MEAN', name=None ) The accumulator accepts gradients marked with local_step greater or equal to the most recent global_step known to the accumulator. The average can be extracted from the accumulator, provided sufficient gradients have been accumulated. Extracting the average automatically resets the aggregate to 0, and increments the global_step recorded by the accumulator. Args 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 type of the value being accumulated. shape A tf.TensorShape or list of ints. The shape of the values, can be [], in which case shape is unknown. container An optional string. Defaults to "". If non-empty, this accumulator is placed in the given container. Otherwise, a default container is used. shared_name An optional string. Defaults to "". If non-empty, this accumulator will be shared under the given name across multiple sessions. reduction_type An optional string from: "MEAN", "SUM". Defaults to "MEAN". name A name for the operation (optional). Returns A Tensor of type mutable string.
tensorflow.raw_ops.conditionalaccumulator
tf.raw_ops.ConfigureDistributedTPU Sets up the centralized structures for a distributed TPU system. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.ConfigureDistributedTPU tf.raw_ops.ConfigureDistributedTPU( embedding_config='', tpu_embedding_config='', is_global_init=False, enable_whole_mesh_compilations=False, compilation_failure_closes_chips=True, name=None ) Args embedding_config An optional string. Defaults to "". Reserved. Do not use. tpu_embedding_config An optional string. Defaults to "". Serialized tensorflow.tpu.TPUEmbeddingConfiguration that describes the embedding lookups of the program. is_global_init An optional bool. Defaults to False. Reserved. Do not use. enable_whole_mesh_compilations An optional bool. Defaults to False. compilation_failure_closes_chips An optional bool. Defaults to True. name A name for the operation (optional). Returns A Tensor of type string.
tensorflow.raw_ops.configuredistributedtpu
tf.raw_ops.ConfigureTPUEmbedding Sets up TPUEmbedding in a distributed TPU system. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.ConfigureTPUEmbedding tf.raw_ops.ConfigureTPUEmbedding( config, name=None ) Args config A string. Serialized tensorflow.tpu.TPUEmbeddingConfiguration that describes the embedding lookups of the program. name A name for the operation (optional). Returns The created Operation.
tensorflow.raw_ops.configuretpuembedding
tf.raw_ops.Conj Returns the complex conjugate of a complex number. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.Conj tf.raw_ops.Conj( input, name=None ) Given a tensor input of complex numbers, this operation returns a tensor of complex numbers that are the complex conjugate of each element in input. The complex numbers in input must be of the form \(a + bj\), where a is the real part and b is the imaginary part. The complex conjugate returned by this operation is of the form \(a - bj\). For example: # tensor 'input' is [-2.25 + 4.75j, 3.25 + 5.75j] tf.conj(input) ==> [-2.25 - 4.75j, 3.25 - 5.75j] Args input A Tensor. Must be one of the following types: complex64, complex128, variant. name A name for the operation (optional). Returns A Tensor. Has the same type as input.
tensorflow.raw_ops.conj
tf.raw_ops.ConjugateTranspose Shuffle dimensions of x according to a permutation and conjugate the result. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.ConjugateTranspose tf.raw_ops.ConjugateTranspose( x, perm, name=None ) The output y has the same rank as x. The shapes of x and y satisfy: y.shape[i] == x.shape[perm[i]] for i in [0, 1, ..., rank(x) - 1] y[i,j,k,...,s,t,u] == conj(x[perm[i], perm[j], perm[k],...,perm[s], perm[t], perm[u]]) Args x A Tensor. perm A Tensor. Must be one of the following types: int32, int64. name A name for the operation (optional). Returns A Tensor. Has the same type as x.
tensorflow.raw_ops.conjugatetranspose
tf.raw_ops.Const Returns a constant tensor. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.Const tf.raw_ops.Const( value, dtype, name=None ) Args value A tf.TensorProto. Attr value is the tensor to return. dtype A tf.DType. name A name for the operation (optional). Returns A Tensor of type dtype.
tensorflow.raw_ops.const
tf.raw_ops.ConsumeMutexLock This op consumes a lock created by MutexLock. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.ConsumeMutexLock tf.raw_ops.ConsumeMutexLock( mutex_lock, name=None ) This op exists to consume a tensor created by MutexLock (other than direct control dependencies). It should be the only that consumes the tensor, and will raise an error if it is not. Its only purpose is to keep the mutex lock tensor alive until it is consumed by this op. Note: This operation must run on the same device as its input. This may be enforced via the colocate_with mechanism. Args mutex_lock A Tensor of type variant. A tensor returned by MutexLock. name A name for the operation (optional). Returns The created Operation.
tensorflow.raw_ops.consumemutexlock
tf.raw_ops.ControlTrigger Does nothing. Serves as a control trigger for scheduling. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.ControlTrigger tf.raw_ops.ControlTrigger( name=None ) Only useful as a placeholder for control edges. Args name A name for the operation (optional). Returns The created Operation.
tensorflow.raw_ops.controltrigger
tf.raw_ops.Conv2D Computes a 2-D convolution given 4-D input and filter tensors. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.Conv2D tf.raw_ops.Conv2D( input, filter, strides, padding, use_cudnn_on_gpu=True, explicit_paddings=[], data_format='NHWC', dilations=[1, 1, 1, 1], name=None ) Given an input tensor of shape [batch, in_height, in_width, in_channels] and a filter / kernel tensor of shape [filter_height, filter_width, in_channels, out_channels], this op performs the following: Flattens the filter to a 2-D matrix with shape [filter_height * filter_width * in_channels, output_channels]. Extracts image patches from the input tensor to form a virtual tensor of shape [batch, out_height, out_width, filter_height * filter_width * in_channels]. For each patch, right-multiplies the filter matrix and the image patch vector. In detail, with the default NHWC format, output[b, i, j, k] = sum_{di, dj, q} input[b, strides[1] * i + di, strides[2] * j + dj, q] * filter[di, dj, q, k] Must have strides[0] = strides[3] = 1. For the most common case of the same horizontal and vertices strides, strides = [1, stride, stride, 1]. Args input A Tensor. Must be one of the following types: half, bfloat16, float32, float64, int32. A 4-D tensor. The dimension order is interpreted according to the value of data_format, see below for details. filter A Tensor. Must have the same type as input. A 4-D tensor of shape [filter_height, filter_width, in_channels, out_channels] strides A list of ints. 1-D tensor of length 4. The stride of the sliding window for each dimension of input. The dimension order is determined by the value of data_format, see below for details. padding A string from: "SAME", "VALID", "EXPLICIT". The type of padding algorithm to use. use_cudnn_on_gpu An optional bool. Defaults to True. explicit_paddings An optional list of ints. Defaults to []. If padding is "EXPLICIT", the list of explicit padding amounts. For the ith dimension, the amount of padding inserted before and after the dimension is explicit_paddings[2 * i] and explicit_paddings[2 * i + 1], respectively. If padding is not "EXPLICIT", explicit_paddings must be empty. data_format An optional string from: "NHWC", "NCHW". Defaults to "NHWC". Specify the data format of the input and output data. With the default format "NHWC", the data is stored in the order of: [batch, height, width, channels]. Alternatively, the format could be "NCHW", the data storage order of: [batch, channels, height, width]. dilations An optional list of ints. Defaults to [1, 1, 1, 1]. 1-D tensor of length 4. The dilation factor for each dimension of input. If set to k > 1, there will be k-1 skipped cells between each filter element on that dimension. The dimension order is determined by the value of data_format, see above for details. Dilations in the batch and depth dimensions must be 1. name A name for the operation (optional). Returns A Tensor. Has the same type as input.
tensorflow.raw_ops.conv2d
tf.raw_ops.Conv2DBackpropFilter Computes the gradients of convolution with respect to the filter. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.Conv2DBackpropFilter tf.raw_ops.Conv2DBackpropFilter( input, filter_sizes, out_backprop, strides, padding, use_cudnn_on_gpu=True, explicit_paddings=[], data_format='NHWC', dilations=[1, 1, 1, 1], name=None ) Args input A Tensor. Must be one of the following types: half, bfloat16, float32, float64. 4-D with shape [batch, in_height, in_width, in_channels]. filter_sizes A Tensor of type int32. An integer vector representing the tensor shape of filter, where filter is a 4-D [filter_height, filter_width, in_channels, out_channels] tensor. out_backprop A Tensor. Must have the same type as input. 4-D with shape [batch, out_height, out_width, out_channels]. Gradients w.r.t. the output of the convolution. strides A list of ints. The stride of the sliding window for each dimension of the input of the convolution. Must be in the same order as the dimension specified with format. padding A string from: "SAME", "VALID", "EXPLICIT". The type of padding algorithm to use. use_cudnn_on_gpu An optional bool. Defaults to True. explicit_paddings An optional list of ints. Defaults to []. If padding is "EXPLICIT", the list of explicit padding amounts. For the ith dimension, the amount of padding inserted before and after the dimension is explicit_paddings[2 * i] and explicit_paddings[2 * i + 1], respectively. If padding is not "EXPLICIT", explicit_paddings must be empty. data_format An optional string from: "NHWC", "NCHW". Defaults to "NHWC". Specify the data format of the input and output data. With the default format "NHWC", the data is stored in the order of: [batch, in_height, in_width, in_channels]. Alternatively, the format could be "NCHW", the data storage order of: [batch, in_channels, in_height, in_width]. dilations An optional list of ints. Defaults to [1, 1, 1, 1]. 1-D tensor of length 4. The dilation factor for each dimension of input. If set to k > 1, there will be k-1 skipped cells between each filter element on that dimension. The dimension order is determined by the value of data_format, see above for details. Dilations in the batch and depth dimensions must be 1. name A name for the operation (optional). Returns A Tensor. Has the same type as input.
tensorflow.raw_ops.conv2dbackpropfilter
tf.raw_ops.Conv2DBackpropInput Computes the gradients of convolution with respect to the input. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.Conv2DBackpropInput tf.raw_ops.Conv2DBackpropInput( input_sizes, filter, out_backprop, strides, padding, use_cudnn_on_gpu=True, explicit_paddings=[], data_format='NHWC', dilations=[1, 1, 1, 1], name=None ) Args input_sizes A Tensor of type int32. An integer vector representing the shape of input, where input is a 4-D [batch, height, width, channels] tensor. filter A Tensor. Must be one of the following types: half, bfloat16, float32, float64, int32. 4-D with shape [filter_height, filter_width, in_channels, out_channels]. out_backprop A Tensor. Must have the same type as filter. 4-D with shape [batch, out_height, out_width, out_channels]. Gradients w.r.t. the output of the convolution. strides A list of ints. The stride of the sliding window for each dimension of the input of the convolution. Must be in the same order as the dimension specified with format. padding A string from: "SAME", "VALID", "EXPLICIT". The type of padding algorithm to use. use_cudnn_on_gpu An optional bool. Defaults to True. explicit_paddings An optional list of ints. Defaults to []. If padding is "EXPLICIT", the list of explicit padding amounts. For the ith dimension, the amount of padding inserted before and after the dimension is explicit_paddings[2 * i] and explicit_paddings[2 * i + 1], respectively. If padding is not "EXPLICIT", explicit_paddings must be empty. data_format An optional string from: "NHWC", "NCHW". Defaults to "NHWC". Specify the data format of the input and output data. With the default format "NHWC", the data is stored in the order of: [batch, in_height, in_width, in_channels]. Alternatively, the format could be "NCHW", the data storage order of: [batch, in_channels, in_height, in_width]. dilations An optional list of ints. Defaults to [1, 1, 1, 1]. 1-D tensor of length 4. The dilation factor for each dimension of input. If set to k > 1, there will be k-1 skipped cells between each filter element on that dimension. The dimension order is determined by the value of data_format, see above for details. Dilations in the batch and depth dimensions must be 1. name A name for the operation (optional). Returns A Tensor. Has the same type as filter.
tensorflow.raw_ops.conv2dbackpropinput
tf.raw_ops.Conv3D Computes a 3-D convolution given 5-D input and filter tensors. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.Conv3D tf.raw_ops.Conv3D( input, filter, strides, padding, data_format='NDHWC', dilations=[1, 1, 1, 1, 1], name=None ) In signal processing, cross-correlation is a measure of similarity of two waveforms as a function of a time-lag applied to one of them. This is also known as a sliding dot product or sliding inner-product. Our Conv3D implements a form of cross-correlation. Args input A Tensor. Must be one of the following types: half, bfloat16, float32, float64. Shape [batch, in_depth, in_height, in_width, in_channels]. filter A Tensor. Must have the same type as input. Shape [filter_depth, filter_height, filter_width, in_channels, out_channels]. in_channels must match between input and filter. strides A list of ints that has length >= 5. 1-D tensor of length 5. The stride of the sliding window for each dimension of input. Must have strides[0] = strides[4] = 1. padding A string from: "SAME", "VALID". The type of padding algorithm to use. data_format An optional string from: "NDHWC", "NCDHW". Defaults to "NDHWC". The data format of the input and output data. With the default format "NDHWC", the data is stored in the order of: [batch, in_depth, in_height, in_width, in_channels]. Alternatively, the format could be "NCDHW", the data storage order is: [batch, in_channels, in_depth, in_height, in_width]. dilations An optional list of ints. Defaults to [1, 1, 1, 1, 1]. 1-D tensor of length 5. The dilation factor for each dimension of input. If set to k > 1, there will be k-1 skipped cells between each filter element on that dimension. The dimension order is determined by the value of data_format, see above for details. Dilations in the batch and depth dimensions must be 1. name A name for the operation (optional). Returns A Tensor. Has the same type as input.
tensorflow.raw_ops.conv3d
tf.raw_ops.Conv3DBackpropFilter Computes the gradients of 3-D convolution with respect to the filter. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.Conv3DBackpropFilter tf.raw_ops.Conv3DBackpropFilter( input, filter, out_backprop, strides, padding, dilations=[1, 1, 1, 1, 1], name=None ) Args input A Tensor. Must be one of the following types: half, float32, float64. Shape [batch, depth, rows, cols, in_channels]. filter A Tensor. Must have the same type as input. Shape [depth, rows, cols, in_channels, out_channels]. in_channels must match between input and filter. out_backprop A Tensor. Must have the same type as input. Backprop signal of shape [batch, out_depth, out_rows, out_cols, out_channels]. strides A list of ints that has length >= 5. 1-D tensor of length 5. The stride of the sliding window for each dimension of input. Must have strides[0] = strides[4] = 1. padding A string from: "SAME", "VALID". The type of padding algorithm to use. dilations An optional list of ints. Defaults to [1, 1, 1, 1, 1]. name A name for the operation (optional). Returns A Tensor. Has the same type as input.
tensorflow.raw_ops.conv3dbackpropfilter
tf.raw_ops.Conv3DBackpropFilterV2 Computes the gradients of 3-D convolution with respect to the filter. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.Conv3DBackpropFilterV2 tf.raw_ops.Conv3DBackpropFilterV2( input, filter_sizes, out_backprop, strides, padding, data_format='NDHWC', dilations=[1, 1, 1, 1, 1], name=None ) Args input A Tensor. Must be one of the following types: half, bfloat16, float32, float64. Shape [batch, depth, rows, cols, in_channels]. filter_sizes A Tensor of type int32. An integer vector representing the tensor shape of filter, where filter is a 5-D [filter_depth, filter_height, filter_width, in_channels, out_channels] tensor. out_backprop A Tensor. Must have the same type as input. Backprop signal of shape [batch, out_depth, out_rows, out_cols, out_channels]. strides A list of ints that has length >= 5. 1-D tensor of length 5. The stride of the sliding window for each dimension of input. Must have strides[0] = strides[4] = 1. padding A string from: "SAME", "VALID". The type of padding algorithm to use. data_format An optional string from: "NDHWC", "NCDHW". Defaults to "NDHWC". The data format of the input and output data. With the default format "NDHWC", the data is stored in the order of: [batch, in_depth, in_height, in_width, in_channels]. Alternatively, the format could be "NCDHW", the data storage order is: [batch, in_channels, in_depth, in_height, in_width]. dilations An optional list of ints. Defaults to [1, 1, 1, 1, 1]. 1-D tensor of length 5. The dilation factor for each dimension of input. If set to k > 1, there will be k-1 skipped cells between each filter element on that dimension. The dimension order is determined by the value of data_format, see above for details. Dilations in the batch and depth dimensions must be 1. name A name for the operation (optional). Returns A Tensor. Has the same type as input.
tensorflow.raw_ops.conv3dbackpropfilterv2
tf.raw_ops.Conv3DBackpropInput Computes the gradients of 3-D convolution with respect to the input. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.Conv3DBackpropInput tf.raw_ops.Conv3DBackpropInput( input, filter, out_backprop, strides, padding, dilations=[1, 1, 1, 1, 1], name=None ) Args input A Tensor. Must be one of the following types: half, float32, float64. Shape [batch, depth, rows, cols, in_channels]. filter A Tensor. Must have the same type as input. Shape [depth, rows, cols, in_channels, out_channels]. in_channels must match between input and filter. out_backprop A Tensor. Must have the same type as input. Backprop signal of shape [batch, out_depth, out_rows, out_cols, out_channels]. strides A list of ints that has length >= 5. 1-D tensor of length 5. The stride of the sliding window for each dimension of input. Must have strides[0] = strides[4] = 1. padding A string from: "SAME", "VALID". The type of padding algorithm to use. dilations An optional list of ints. Defaults to [1, 1, 1, 1, 1]. name A name for the operation (optional). Returns A Tensor. Has the same type as input.
tensorflow.raw_ops.conv3dbackpropinput
tf.raw_ops.Conv3DBackpropInputV2 Computes the gradients of 3-D convolution with respect to the input. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.Conv3DBackpropInputV2 tf.raw_ops.Conv3DBackpropInputV2( input_sizes, filter, out_backprop, strides, padding, data_format='NDHWC', dilations=[1, 1, 1, 1, 1], name=None ) Args input_sizes A Tensor. Must be one of the following types: int32, int64. An integer vector representing the tensor shape of input, where input is a 5-D [batch, depth, rows, cols, in_channels] tensor. filter A Tensor. Must be one of the following types: half, bfloat16, float32, float64. Shape [depth, rows, cols, in_channels, out_channels]. in_channels must match between input and filter. out_backprop A Tensor. Must have the same type as filter. Backprop signal of shape [batch, out_depth, out_rows, out_cols, out_channels]. strides A list of ints that has length >= 5. 1-D tensor of length 5. The stride of the sliding window for each dimension of input. Must have strides[0] = strides[4] = 1. padding A string from: "SAME", "VALID". The type of padding algorithm to use. data_format An optional string from: "NDHWC", "NCDHW". Defaults to "NDHWC". The data format of the input and output data. With the default format "NDHWC", the data is stored in the order of: [batch, in_depth, in_height, in_width, in_channels]. Alternatively, the format could be "NCDHW", the data storage order is: [batch, in_channels, in_depth, in_height, in_width]. dilations An optional list of ints. Defaults to [1, 1, 1, 1, 1]. 1-D tensor of length 5. The dilation factor for each dimension of input. If set to k > 1, there will be k-1 skipped cells between each filter element on that dimension. The dimension order is determined by the value of data_format, see above for details. Dilations in the batch and depth dimensions must be 1. name A name for the operation (optional). Returns A Tensor. Has the same type as filter.
tensorflow.raw_ops.conv3dbackpropinputv2
tf.raw_ops.Copy Copy a tensor from CPU-to-CPU or GPU-to-GPU. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.Copy tf.raw_ops.Copy( input, tensor_name='', debug_ops_spec=[], name=None ) Performs CPU-to-CPU or GPU-to-GPU deep-copying of tensor, depending on the device on which the tensor is allocated. N.B.: If the all downstream attached debug ops are disabled given the current gRPC gating status, the output will simply forward the input tensor without deep-copying. See the documentation of Debug* ops for more details. Unlike the CopyHost Op, this op does not have HostMemory constraint on its input or output. Args input A Tensor. Input tensor. tensor_name An optional string. Defaults to "". The name of the input tensor. debug_ops_spec An optional list of strings. Defaults to []. A list of debug op spec (op, url, gated_grpc) for attached debug ops. Each element of the list has the format ;;, wherein gated_grpc is boolean represented as 0/1. E.g., "DebugIdentity;grpc://foo:3333;1", "DebugIdentity;file:///tmp/tfdbg_1;0". name A name for the operation (optional). Returns A Tensor. Has the same type as input.
tensorflow.raw_ops.copy
tf.raw_ops.CopyHost Copy a tensor to host. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.CopyHost tf.raw_ops.CopyHost( input, tensor_name='', debug_ops_spec=[], name=None ) Performs CPU-to-CPU deep-copying of tensor. N.B.: If the all downstream attached debug ops are disabled given the current gRPC gating status, the output will simply forward the input tensor without deep-copying. See the documentation of Debug* ops for more details. Unlike the Copy Op, this op has HostMemory constraint on its input or output. Args input A Tensor. Input tensor. tensor_name An optional string. Defaults to "". The name of the input tensor. debug_ops_spec An optional list of strings. Defaults to []. A list of debug op spec (op, url, gated_grpc) for attached debug ops. Each element of the list has the format ;;, wherein gated_grpc is boolean represented as 0/1. E.g., "DebugIdentity;grpc://foo:3333;1", "DebugIdentity;file:///tmp/tfdbg_1;0". name A name for the operation (optional). Returns A Tensor. Has the same type as input.
tensorflow.raw_ops.copyhost
tf.raw_ops.Cos Computes cos of x element-wise. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.Cos tf.raw_ops.Cos( x, name=None ) Given an input tensor, this function computes cosine of every element in the tensor. Input range is (-inf, inf) and output range is [-1,1]. If input lies outside the boundary, nan is returned. x = tf.constant([-float("inf"), -9, -0.5, 1, 1.2, 200, 10000, float("inf")]) tf.math.cos(x) ==> [nan -0.91113025 0.87758255 0.5403023 0.36235774 0.48718765 -0.95215535 nan] Args x A Tensor. Must be one of the following types: bfloat16, half, float32, float64, complex64, complex128. name A name for the operation (optional). Returns A Tensor. Has the same type as x.
tensorflow.raw_ops.cos
tf.raw_ops.Cosh Computes hyperbolic cosine of x element-wise. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.Cosh tf.raw_ops.Cosh( x, name=None ) Given an input tensor, this function computes hyperbolic cosine of every element in the tensor. Input range is [-inf, inf] and output range is [1, inf]. x = tf.constant([-float("inf"), -9, -0.5, 1, 1.2, 2, 10, float("inf")]) tf.math.cosh(x) ==> [inf 4.0515420e+03 1.1276259e+00 1.5430807e+00 1.8106556e+00 3.7621956e+00 1.1013233e+04 inf] Args x A Tensor. Must be one of the following types: bfloat16, half, float32, float64, complex64, complex128. name A name for the operation (optional). Returns A Tensor. Has the same type as x.
tensorflow.raw_ops.cosh
tf.raw_ops.CountUpTo Increments 'ref' until it reaches 'limit'. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.CountUpTo tf.raw_ops.CountUpTo( ref, limit, name=None ) Args ref A mutable Tensor. Must be one of the following types: int32, int64. Should be from a scalar Variable node. limit An int. If incrementing ref would bring it above limit, instead generates an 'OutOfRange' error. name A name for the operation (optional). Returns A Tensor. Has the same type as ref.
tensorflow.raw_ops.countupto
tf.raw_ops.CreateSummaryDbWriter View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.CreateSummaryDbWriter tf.raw_ops.CreateSummaryDbWriter( writer, db_uri, experiment_name, run_name, user_name, name=None ) Args writer A Tensor of type resource. db_uri A Tensor of type string. experiment_name A Tensor of type string. run_name A Tensor of type string. user_name A Tensor of type string. name A name for the operation (optional). Returns The created Operation.
tensorflow.raw_ops.createsummarydbwriter
tf.raw_ops.CreateSummaryFileWriter View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.CreateSummaryFileWriter tf.raw_ops.CreateSummaryFileWriter( writer, logdir, max_queue, flush_millis, filename_suffix, name=None ) Args writer A Tensor of type resource. logdir A Tensor of type string. max_queue A Tensor of type int32. flush_millis A Tensor of type int32. filename_suffix A Tensor of type string. name A name for the operation (optional). Returns The created Operation.
tensorflow.raw_ops.createsummaryfilewriter
tf.raw_ops.CropAndResize Extracts crops from the input image tensor and resizes them. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.CropAndResize tf.raw_ops.CropAndResize( image, boxes, box_ind, crop_size, method='bilinear', extrapolation_value=0, name=None ) Extracts crops from the input image tensor and resizes them using bilinear sampling or nearest neighbor sampling (possibly with aspect ratio change) to a common output size specified by crop_size. This is more general than the crop_to_bounding_box op which extracts a fixed size slice from the input image and does not allow resizing or aspect ratio change. Returns a tensor with crops from the input image at positions defined at the bounding box locations in boxes. The cropped boxes are all resized (with bilinear or nearest neighbor interpolation) to a fixed size = [crop_height, crop_width]. The result is a 4-D tensor [num_boxes, crop_height, crop_width, depth]. The resizing is corner aligned. In particular, if boxes = [[0, 0, 1, 1]], the method will give identical results to using tf.image.resize_bilinear() or tf.image.resize_nearest_neighbor()(depends on the method argument) with align_corners=True. Args image A Tensor. Must be one of the following types: uint8, uint16, int8, int16, int32, int64, half, float32, float64. A 4-D tensor of shape [batch, image_height, image_width, depth]. Both image_height and image_width need to be positive. boxes A Tensor of type float32. A 2-D tensor of shape [num_boxes, 4]. The i-th row of the tensor specifies the coordinates of a box in the box_ind[i] image and is specified in normalized coordinates [y1, x1, y2, x2]. A normalized coordinate value of y is mapped to the image coordinate at y * (image_height - 1), so as the [0, 1] interval of normalized image height is mapped to [0, image_height - 1] in image height coordinates. We do allow y1 > y2, in which case the sampled crop is an up-down flipped version of the original image. The width dimension is treated similarly. Normalized coordinates outside the [0, 1] range are allowed, in which case we use extrapolation_value to extrapolate the input image values. box_ind A Tensor of type int32. A 1-D tensor of shape [num_boxes] with int32 values in [0, batch). The value of box_ind[i] specifies the image that the i-th box refers to. crop_size A Tensor of type int32. A 1-D tensor of 2 elements, size = [crop_height, crop_width]. All cropped image patches are resized to this size. The aspect ratio of the image content is not preserved. Both crop_height and crop_width need to be positive. method An optional string from: "bilinear", "nearest". Defaults to "bilinear". A string specifying the sampling method for resizing. It can be either "bilinear" or "nearest" and default to "bilinear". Currently two sampling methods are supported: Bilinear and Nearest Neighbor. extrapolation_value An optional float. Defaults to 0. Value used for extrapolation, when applicable. name A name for the operation (optional). Returns A Tensor of type float32.
tensorflow.raw_ops.cropandresize
tf.raw_ops.CropAndResizeGradBoxes Computes the gradient of the crop_and_resize op wrt the input boxes tensor. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.CropAndResizeGradBoxes tf.raw_ops.CropAndResizeGradBoxes( grads, image, boxes, box_ind, method='bilinear', name=None ) Args grads A Tensor of type float32. A 4-D tensor of shape [num_boxes, crop_height, crop_width, depth]. image A Tensor. Must be one of the following types: uint8, uint16, int8, int16, int32, int64, half, float32, float64. A 4-D tensor of shape [batch, image_height, image_width, depth]. Both image_height and image_width need to be positive. boxes A Tensor of type float32. A 2-D tensor of shape [num_boxes, 4]. The i-th row of the tensor specifies the coordinates of a box in the box_ind[i] image and is specified in normalized coordinates [y1, x1, y2, x2]. A normalized coordinate value of y is mapped to the image coordinate at y * (image_height - 1), so as the [0, 1] interval of normalized image height is mapped to [0, image_height - 1] in image height coordinates. We do allow y1 > y2, in which case the sampled crop is an up-down flipped version of the original image. The width dimension is treated similarly. Normalized coordinates outside the[0, 1]range are allowed, in which case we useextrapolation_valueto extrapolate the input image values. </td> </tr><tr> <td>box_ind</td> <td> ATensorof typeint32. A 1-D tensor of shape[num_boxes]with int32 values in[0, batch). The value ofbox_ind[i]specifies the image that thei-th box refers to. </td> </tr><tr> <td>method</td> <td> An optionalstringfrom:"bilinear". Defaults to"bilinear". A string specifying the interpolation method. Only 'bilinear' is supported for now. </td> </tr><tr> <td>name` A name for the operation (optional). Returns A Tensor of type float32.
tensorflow.raw_ops.cropandresizegradboxes
tf.raw_ops.CropAndResizeGradImage Computes the gradient of the crop_and_resize op wrt the input image tensor. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.CropAndResizeGradImage tf.raw_ops.CropAndResizeGradImage( grads, boxes, box_ind, image_size, T, method='bilinear', name=None ) Args grads A Tensor of type float32. A 4-D tensor of shape [num_boxes, crop_height, crop_width, depth]. boxes A Tensor of type float32. A 2-D tensor of shape [num_boxes, 4]. The i-th row of the tensor specifies the coordinates of a box in the box_ind[i] image and is specified in normalized coordinates [y1, x1, y2, x2]. A normalized coordinate value of y is mapped to the image coordinate at y * (image_height - 1), so as the [0, 1] interval of normalized image height is mapped to [0, image_height - 1] in image height coordinates. We do allow y1 > y2, in which case the sampled crop is an up-down flipped version of the original image. The width dimension is treated similarly. Normalized coordinates outside the[0, 1]range are allowed, in which case we useextrapolation_valueto extrapolate the input image values. </td> </tr><tr> <td>box_ind</td> <td> ATensorof typeint32. A 1-D tensor of shape[num_boxes]with int32 values in[0, batch). The value ofbox_ind[i]specifies the image that thei-th box refers to. </td> </tr><tr> <td>image_size</td> <td> ATensorof typeint32. A 1-D tensor with value[batch, image_height, image_width, depth]containing the original image size. Bothimage_heightandimage_widthneed to be positive. </td> </tr><tr> <td>T</td> <td> A <a href="../../tf/dtypes/DType"><code>tf.DType</code></a> from:tf.float32, tf.half, tf.float64. </td> </tr><tr> <td>method</td> <td> An optionalstringfrom:"bilinear", "nearest". Defaults to"bilinear". A string specifying the interpolation method. Only 'bilinear' is supported for now. </td> </tr><tr> <td>name` A name for the operation (optional). Returns A Tensor of type T.
tensorflow.raw_ops.cropandresizegradimage
tf.raw_ops.Cross Compute the pairwise cross product. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.Cross tf.raw_ops.Cross( a, b, name=None ) a and b must be the same shape; they can either be simple 3-element vectors, or any shape where the innermost dimension is 3. In the latter case, each pair of corresponding 3-element vectors is cross-multiplied independently. Args a A Tensor. Must be one of the following types: float32, float64, int32, uint8, int16, int8, int64, bfloat16, uint16, half, uint32, uint64. A tensor containing 3-element vectors. b A Tensor. Must have the same type as a. Another tensor, of same type and shape as a. name A name for the operation (optional). Returns A Tensor. Has the same type as a.
tensorflow.raw_ops.cross
tf.raw_ops.CrossReplicaSum An Op to sum inputs across replicated TPU instances. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.CrossReplicaSum tf.raw_ops.CrossReplicaSum( input, group_assignment, name=None ) Each instance supplies its own input. For example, suppose there are 8 TPU instances: [A, B, C, D, E, F, G, H]. Passing group_assignment=[[0,2,4,6],[1,3,5,7]] sets A, C, E, G as group 0, and B, D, F, H as group 1. Thus we get the outputs: [A+C+E+G, B+D+F+H, A+C+E+G, B+D+F+H, A+C+E+G, B+D+F+H, A+C+E+G, B+D+F+H]. Args input A Tensor. Must be one of the following types: half, bfloat16, float32, int32, uint32. The local input to the sum. group_assignment A Tensor of type int32. An int32 tensor with shape [num_groups, num_replicas_per_group]. group_assignment[i] represents the replica ids in the ith subgroup. name A name for the operation (optional). Returns A Tensor. Has the same type as input.
tensorflow.raw_ops.crossreplicasum
tf.raw_ops.CSRSparseMatrixComponents Reads out the CSR components at batch index. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.CSRSparseMatrixComponents tf.raw_ops.CSRSparseMatrixComponents( csr_sparse_matrix, index, type, name=None ) This op is meant only for debugging / testing, and its interface is not expected to be stable. Args csr_sparse_matrix A Tensor of type variant. A batched CSRSparseMatrix. index A Tensor of type int32. The index in csr_sparse_matrix's batch. type A tf.DType from: tf.float32, tf.float64, tf.complex64, tf.complex128. name A name for the operation (optional). Returns A tuple of Tensor objects (row_ptrs, col_inds, values). row_ptrs A Tensor of type int32. col_inds A Tensor of type int32. values A Tensor of type type.
tensorflow.raw_ops.csrsparsematrixcomponents
tf.raw_ops.CSRSparseMatrixToDense Convert a (possibly batched) CSRSparseMatrix to dense. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.CSRSparseMatrixToDense tf.raw_ops.CSRSparseMatrixToDense( sparse_input, type, name=None ) Args sparse_input A Tensor of type variant. A batched CSRSparseMatrix. type A tf.DType from: tf.float32, tf.float64, tf.complex64, tf.complex128. name A name for the operation (optional). Returns A Tensor of type type.
tensorflow.raw_ops.csrsparsematrixtodense
tf.raw_ops.CSRSparseMatrixToSparseTensor Converts a (possibly batched) CSRSparesMatrix to a SparseTensor. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.CSRSparseMatrixToSparseTensor tf.raw_ops.CSRSparseMatrixToSparseTensor( sparse_matrix, type, name=None ) Args sparse_matrix A Tensor of type variant. A (possibly batched) CSRSparseMatrix. type A tf.DType from: tf.float32, tf.float64, tf.complex64, tf.complex128. name A name for the operation (optional). Returns A tuple of Tensor objects (indices, values, dense_shape). indices A Tensor of type int64. values A Tensor of type type. dense_shape A Tensor of type int64.
tensorflow.raw_ops.csrsparsematrixtosparsetensor
tf.raw_ops.CSVDataset View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.CSVDataset tf.raw_ops.CSVDataset( filenames, compression_type, buffer_size, header, field_delim, use_quote_delim, na_value, select_cols, record_defaults, output_shapes, name=None ) Args filenames A Tensor of type string. compression_type A Tensor of type string. buffer_size A Tensor of type int64. header A Tensor of type bool. field_delim A Tensor of type string. use_quote_delim A Tensor of type bool. na_value A Tensor of type string. select_cols A Tensor of type int64. record_defaults A list of Tensor objects with types from: float32, float64, int32, int64, string. output_shapes A list of shapes (each a tf.TensorShape or list of ints) that has length >= 1. name A name for the operation (optional). Returns A Tensor of type variant.
tensorflow.raw_ops.csvdataset
tf.raw_ops.CSVDatasetV2 View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.CSVDatasetV2 tf.raw_ops.CSVDatasetV2( filenames, compression_type, buffer_size, header, field_delim, use_quote_delim, na_value, select_cols, record_defaults, exclude_cols, output_shapes, name=None ) Args filenames A Tensor of type string. compression_type A Tensor of type string. buffer_size A Tensor of type int64. header A Tensor of type bool. field_delim A Tensor of type string. use_quote_delim A Tensor of type bool. na_value A Tensor of type string. select_cols A Tensor of type int64. record_defaults A list of Tensor objects with types from: float32, float64, int32, int64, string. exclude_cols A Tensor of type int64. 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.csvdatasetv2
tf.raw_ops.CTCBeamSearchDecoder Performs beam search decoding on the logits given in input. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.CTCBeamSearchDecoder tf.raw_ops.CTCBeamSearchDecoder( inputs, sequence_length, beam_width, top_paths, merge_repeated=True, name=None ) A note about the attribute merge_repeated: For the beam search decoder, this means that if consecutive entries in a beam are the same, only the first of these is emitted. That is, when the top path is "A B B B B", "A B" is returned if merge_repeated = True but "A B B B B" is returned if merge_repeated = False. Args inputs A Tensor. Must be one of the following types: float32, float64. 3-D, shape: (max_time x batch_size x num_classes), the logits. sequence_length A Tensor of type int32. A vector containing sequence lengths, size (batch). beam_width An int that is >= 1. A scalar >= 0 (beam search beam width). top_paths An int that is >= 1. A scalar >= 0, <= beam_width (controls output size). merge_repeated An optional bool. Defaults to True. If true, merge repeated classes in output. name A name for the operation (optional). Returns A tuple of Tensor objects (decoded_indices, decoded_values, decoded_shape, log_probability). decoded_indices A list of top_paths Tensor objects with type int64. decoded_values A list of top_paths Tensor objects with type int64. decoded_shape A list of top_paths Tensor objects with type int64. log_probability A Tensor. Has the same type as inputs.
tensorflow.raw_ops.ctcbeamsearchdecoder
tf.raw_ops.CTCGreedyDecoder Performs greedy decoding on the logits given in inputs. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.CTCGreedyDecoder tf.raw_ops.CTCGreedyDecoder( inputs, sequence_length, merge_repeated=False, name=None ) A note about the attribute merge_repeated: if enabled, when consecutive logits' maximum indices are the same, only the first of these is emitted. Labeling the blank '*', the sequence "A B B * B B" becomes "A B B" if merge_repeated = True and "A B B B B" if merge_repeated = False. Regardless of the value of merge_repeated, if the maximum index of a given time and batch corresponds to the blank, index (num_classes - 1), no new element is emitted. Args inputs A Tensor. Must be one of the following types: float32, float64. 3-D, shape: (max_time x batch_size x num_classes), the logits. sequence_length A Tensor of type int32. A vector containing sequence lengths, size (batch_size). merge_repeated An optional bool. Defaults to False. If True, merge repeated classes in output. name A name for the operation (optional). Returns A tuple of Tensor objects (decoded_indices, decoded_values, decoded_shape, log_probability). decoded_indices A Tensor of type int64. decoded_values A Tensor of type int64. decoded_shape A Tensor of type int64. log_probability A Tensor. Has the same type as inputs.
tensorflow.raw_ops.ctcgreedydecoder
tf.raw_ops.CTCLoss Calculates the CTC Loss (log probability) for each batch entry. Also calculates View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.CTCLoss tf.raw_ops.CTCLoss( inputs, labels_indices, labels_values, sequence_length, preprocess_collapse_repeated=False, ctc_merge_repeated=True, ignore_longer_outputs_than_inputs=False, name=None ) the gradient. This class performs the softmax operation for you, so inputs should be e.g. linear projections of outputs by an LSTM. Args inputs A Tensor. Must be one of the following types: float32, float64. 3-D, shape: (max_time x batch_size x num_classes), the logits. labels_indices A Tensor of type int64. The indices of a SparseTensor<int32, 2>. labels_indices(i, :) == [b, t] means labels_values(i) stores the id for (batch b, time t). labels_values A Tensor of type int32. The values (labels) associated with the given batch and time. sequence_length A Tensor of type int32. A vector containing sequence lengths (batch). preprocess_collapse_repeated An optional bool. Defaults to False. Scalar, if true then repeated labels are collapsed prior to the CTC calculation. ctc_merge_repeated An optional bool. Defaults to True. Scalar. If set to false, during CTC calculation repeated non-blank labels will not be merged and are interpreted as individual labels. This is a simplified version of CTC. ignore_longer_outputs_than_inputs An optional bool. Defaults to False. Scalar. If set to true, during CTC calculation, items that have longer output sequences than input sequences are skipped: they don't contribute to the loss term and have zero-gradient. name A name for the operation (optional). Returns A tuple of Tensor objects (loss, gradient). loss A Tensor. Has the same type as inputs. gradient A Tensor. Has the same type as inputs.
tensorflow.raw_ops.ctcloss
tf.raw_ops.CTCLossV2 Calculates the CTC Loss (log probability) for each batch entry. Also calculates View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.CTCLossV2 tf.raw_ops.CTCLossV2( inputs, labels_indices, labels_values, sequence_length, preprocess_collapse_repeated=False, ctc_merge_repeated=True, ignore_longer_outputs_than_inputs=False, name=None ) the gradient. This class performs the softmax operation for you, so inputs should be e.g. linear projections of outputs by an LSTM. Args inputs A Tensor of type float32. 3-D, shape: (max_time x batch_size x num_classes), the logits. Default blank label is 0 rather num_classes - 1. labels_indices A Tensor of type int64. The indices of a SparseTensor<int32, 2>. labels_indices(i, :) == [b, t] means labels_values(i) stores the id for (batch b, time t). labels_values A Tensor of type int32. The values (labels) associated with the given batch and time. sequence_length A Tensor of type int32. A vector containing sequence lengths (batch). preprocess_collapse_repeated An optional bool. Defaults to False. Scalar, if true then repeated labels are collapsed prior to the CTC calculation. ctc_merge_repeated An optional bool. Defaults to True. Scalar. If set to false, during CTC calculation repeated non-blank labels will not be merged and are interpreted as individual labels. This is a simplified version of CTC. ignore_longer_outputs_than_inputs An optional bool. Defaults to False. Scalar. If set to true, during CTC calculation, items that have longer output sequences than input sequences are skipped: they don't contribute to the loss term and have zero-gradient. name A name for the operation (optional). Returns A tuple of Tensor objects (loss, gradient). loss A Tensor of type float32. gradient A Tensor of type float32.
tensorflow.raw_ops.ctclossv2
tf.raw_ops.CudnnRNN A RNN backed by cuDNN. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.CudnnRNN tf.raw_ops.CudnnRNN( input, input_h, input_c, params, rnn_mode='lstm', input_mode='linear_input', direction='unidirectional', dropout=0, seed=0, seed2=0, is_training=True, name=None ) Computes the RNN from the input and initial states, with respect to the params buffer. rnn_mode: Indicates the type of the RNN model. input_mode: Indicate whether there is a linear projection between the input and the actual computation before the first layer. 'skip_input' is only allowed when input_size == num_units; 'auto_select' implies 'skip_input' when input_size == num_units; otherwise, it implies 'linear_input'. direction: Indicates whether a bidirectional model will be used. Should be "unidirectional" or "bidirectional". dropout: Dropout probability. When set to 0., dropout is disabled. seed: The 1st part of a seed to initialize dropout. seed2: The 2nd part of a seed to initialize dropout. input: A 3-D tensor with the shape of [seq_length, batch_size, input_size]. input_h: A 3-D tensor with the shape of [num_layer * dir, batch_size, num_units]. input_c: For LSTM, a 3-D tensor with the shape of [num_layer * dir, batch, num_units]. For other models, it is ignored. params: A 1-D tensor that contains the weights and biases in an opaque layout. The size must be created through CudnnRNNParamsSize, and initialized separately. Note that they might not be compatible across different generations. So it is a good idea to save and restore output: A 3-D tensor with the shape of [seq_length, batch_size, dir * num_units]. output_h: The same shape has input_h. output_c: The same shape as input_c for LSTM. An empty tensor for other models. is_training: Indicates whether this operation is used for inference or training. reserve_space: An opaque tensor that can be used in backprop calculation. It is only produced if is_training is false. Args input A Tensor. Must be one of the following types: half, float32, float64. input_h A Tensor. Must have the same type as input. input_c A Tensor. Must have the same type as input. params A Tensor. Must have the same type as input. rnn_mode An optional string from: "rnn_relu", "rnn_tanh", "lstm", "gru". Defaults to "lstm". input_mode An optional string from: "linear_input", "skip_input", "auto_select". Defaults to "linear_input". direction An optional string from: "unidirectional", "bidirectional". Defaults to "unidirectional". dropout An optional float. Defaults to 0. seed An optional int. Defaults to 0. seed2 An optional int. Defaults to 0. is_training An optional bool. Defaults to True. name A name for the operation (optional). Returns A tuple of Tensor objects (output, output_h, output_c, reserve_space). output A Tensor. Has the same type as input. output_h A Tensor. Has the same type as input. output_c A Tensor. Has the same type as input. reserve_space A Tensor. Has the same type as input.
tensorflow.raw_ops.cudnnrnn
tf.raw_ops.CudnnRNNBackprop Backprop step of CudnnRNN. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.CudnnRNNBackprop tf.raw_ops.CudnnRNNBackprop( input, input_h, input_c, params, output, output_h, output_c, output_backprop, output_h_backprop, output_c_backprop, reserve_space, rnn_mode='lstm', input_mode='linear_input', direction='unidirectional', dropout=0, seed=0, seed2=0, name=None ) Compute the backprop of both data and weights in a RNN. rnn_mode: Indicates the type of the RNN model. input_mode: Indicate whether there is a linear projection between the input and the actual computation before the first layer. 'skip_input' is only allowed when input_size == num_units; 'auto_select' implies 'skip_input' when input_size == num_units; otherwise, it implies 'linear_input'. direction: Indicates whether a bidirectional model will be used. Should be "unidirectional" or "bidirectional". dropout: Dropout probability. When set to 0., dropout is disabled. seed: The 1st part of a seed to initialize dropout. seed2: The 2nd part of a seed to initialize dropout. input: A 3-D tensor with the shape of [seq_length, batch_size, input_size]. input_h: A 3-D tensor with the shape of [num_layer * dir, batch_size, num_units]. input_c: For LSTM, a 3-D tensor with the shape of [num_layer * dir, batch, num_units]. For other models, it is ignored. params: A 1-D tensor that contains the weights and biases in an opaque layout. The size must be created through CudnnRNNParamsSize, and initialized separately. Note that they might not be compatible across different generations. So it is a good idea to save and restore output: A 3-D tensor with the shape of [seq_length, batch_size, dir * num_units]. output_h: The same shape has input_h. output_c: The same shape as input_c for LSTM. An empty tensor for other models. output_backprop: A 3-D tensor with the same shape as output in the forward pass. output_h_backprop: A 3-D tensor with the same shape as output_h in the forward pass. output_c_backprop: A 3-D tensor with the same shape as output_c in the forward pass. reserve_space: The same reserve_space produced in for forward operation. input_backprop: The backprop to input in the forward pass. Has the same shape as input. input_h_backprop: The backprop to input_h in the forward pass. Has the same shape as input_h. input_c_backprop: The backprop to input_c in the forward pass. Has the same shape as input_c. params_backprop: The backprop to the params buffer in the forward pass. Has the same shape as params. Args input A Tensor. Must be one of the following types: half, float32, float64. input_h A Tensor. Must have the same type as input. input_c A Tensor. Must have the same type as input. params A Tensor. Must have the same type as input. output A Tensor. Must have the same type as input. output_h A Tensor. Must have the same type as input. output_c A Tensor. Must have the same type as input. output_backprop A Tensor. Must have the same type as input. output_h_backprop A Tensor. Must have the same type as input. output_c_backprop A Tensor. Must have the same type as input. reserve_space A Tensor. Must have the same type as input. rnn_mode An optional string from: "rnn_relu", "rnn_tanh", "lstm", "gru". Defaults to "lstm". input_mode An optional string from: "linear_input", "skip_input", "auto_select". Defaults to "linear_input". direction An optional string from: "unidirectional", "bidirectional". Defaults to "unidirectional". dropout An optional float. Defaults to 0. seed An optional int. Defaults to 0. seed2 An optional int. Defaults to 0. name A name for the operation (optional). Returns A tuple of Tensor objects (input_backprop, input_h_backprop, input_c_backprop, params_backprop). input_backprop A Tensor. Has the same type as input. input_h_backprop A Tensor. Has the same type as input. input_c_backprop A Tensor. Has the same type as input. params_backprop A Tensor. Has the same type as input.
tensorflow.raw_ops.cudnnrnnbackprop
tf.raw_ops.CudnnRNNBackpropV2 Backprop step of CudnnRNN. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.CudnnRNNBackpropV2 tf.raw_ops.CudnnRNNBackpropV2( input, input_h, input_c, params, output, output_h, output_c, output_backprop, output_h_backprop, output_c_backprop, reserve_space, host_reserved, rnn_mode='lstm', input_mode='linear_input', direction='unidirectional', dropout=0, seed=0, seed2=0, name=None ) Compute the backprop of both data and weights in a RNN. Takes an extra "host_reserved" inupt than CudnnRNNBackprop, which is used to determine RNN cudnnRNNAlgo_t and cudnnMathType_t. rnn_mode: Indicates the type of the RNN model. input_mode: Indicates whether there is a linear projection between the input and the actual computation before the first layer. 'skip_input' is only allowed when input_size == num_units; 'auto_select' implies 'skip_input' when input_size == num_units; otherwise, it implies 'linear_input'. direction: Indicates whether a bidirectional model will be used. Should be "unidirectional" or "bidirectional". dropout: Dropout probability. When set to 0., dropout is disabled. seed: The 1st part of a seed to initialize dropout. seed2: The 2nd part of a seed to initialize dropout. input: A 3-D tensor with the shape of [seq_length, batch_size, input_size]. input_h: A 3-D tensor with the shape of [num_layer * dir, batch_size, num_units]. input_c: For LSTM, a 3-D tensor with the shape of [num_layer * dir, batch, num_units]. For other models, it is ignored. params: A 1-D tensor that contains the weights and biases in an opaque layout. The size must be created through CudnnRNNParamsSize, and initialized separately. Note that they might not be compatible across different generations. So it is a good idea to save and restore output: A 3-D tensor with the shape of [seq_length, batch_size, dir * num_units]. output_h: The same shape has input_h. output_c: The same shape as input_c for LSTM. An empty tensor for other models. output_backprop: A 3-D tensor with the same shape as output in the forward pass. output_h_backprop: A 3-D tensor with the same shape as output_h in the forward pass. output_c_backprop: A 3-D tensor with the same shape as output_c in the forward pass. reserve_space: The same reserve_space produced in the forward operation. host_reserved: The same host_reserved produced in the forward operation. input_backprop: The backprop to input in the forward pass. Has the same shape as input. input_h_backprop: The backprop to input_h in the forward pass. Has the same shape as input_h. input_c_backprop: The backprop to input_c in the forward pass. Has the same shape as input_c. params_backprop: The backprop to the params buffer in the forward pass. Has the same shape as params. Args input A Tensor. Must be one of the following types: half, float32, float64. input_h A Tensor. Must have the same type as input. input_c A Tensor. Must have the same type as input. params A Tensor. Must have the same type as input. output A Tensor. Must have the same type as input. output_h A Tensor. Must have the same type as input. output_c A Tensor. Must have the same type as input. output_backprop A Tensor. Must have the same type as input. output_h_backprop A Tensor. Must have the same type as input. output_c_backprop A Tensor. Must have the same type as input. reserve_space A Tensor. Must have the same type as input. host_reserved A Tensor of type int8. rnn_mode An optional string from: "rnn_relu", "rnn_tanh", "lstm", "gru". Defaults to "lstm". input_mode An optional string from: "linear_input", "skip_input", "auto_select". Defaults to "linear_input". direction An optional string from: "unidirectional", "bidirectional". Defaults to "unidirectional". dropout An optional float. Defaults to 0. seed An optional int. Defaults to 0. seed2 An optional int. Defaults to 0. name A name for the operation (optional). Returns A tuple of Tensor objects (input_backprop, input_h_backprop, input_c_backprop, params_backprop). input_backprop A Tensor. Has the same type as input. input_h_backprop A Tensor. Has the same type as input. input_c_backprop A Tensor. Has the same type as input. params_backprop A Tensor. Has the same type as input.
tensorflow.raw_ops.cudnnrnnbackpropv2
tf.raw_ops.CudnnRNNBackpropV3 Backprop step of CudnnRNNV3. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.CudnnRNNBackpropV3 tf.raw_ops.CudnnRNNBackpropV3( input, input_h, input_c, params, sequence_lengths, output, output_h, output_c, output_backprop, output_h_backprop, output_c_backprop, reserve_space, host_reserved, rnn_mode='lstm', input_mode='linear_input', direction='unidirectional', dropout=0, seed=0, seed2=0, num_proj=0, time_major=True, name=None ) Compute the backprop of both data and weights in a RNN. Takes an extra "sequence_lengths" input than CudnnRNNBackprop. rnn_mode: Indicates the type of the RNN model. input_mode: Indicates whether there is a linear projection between the input and the actual computation before the first layer. 'skip_input' is only allowed when input_size == num_units; 'auto_select' implies 'skip_input' when input_size == num_units; otherwise, it implies 'linear_input'. direction: Indicates whether a bidirectional model will be used. Should be "unidirectional" or "bidirectional". dropout: Dropout probability. When set to 0., dropout is disabled. seed: The 1st part of a seed to initialize dropout. seed2: The 2nd part of a seed to initialize dropout. input: If time_major is true, this is a 3-D tensor with the shape of [seq_length, batch_size, input_size]. If time_major is false, the shape is [batch_size, seq_length, input_size]. input_h: If time_major is true, this is a 3-D tensor with the shape of [num_layer * dir, batch_size, num_units]. If time_major is false, the shape is [batch_size, num_layer * dir, num_units]. input_c: For LSTM, a 3-D tensor with the shape of [num_layer * dir, batch, num_units]. For other models, it is ignored. params: A 1-D tensor that contains the weights and biases in an opaque layout. The size must be created through CudnnRNNParamsSize, and initialized separately. Note that they might not be compatible across different generations. So it is a good idea to save and restore sequence_lengths: a vector of lengths of each input sequence. output: If time_major is true, this is a 3-D tensor with the shape of [seq_length, batch_size, dir * num_units]. If time_major is false, the shape is [batch_size, seq_length, dir * num_units]. output_h: The same shape has input_h. output_c: The same shape as input_c for LSTM. An empty tensor for other models. output_backprop: A 3-D tensor with the same shape as output in the forward pass. output_h_backprop: A 3-D tensor with the same shape as output_h in the forward pass. output_c_backprop: A 3-D tensor with the same shape as output_c in the forward pass. time_major: Indicates whether the input/output format is time major or batch major. reserve_space: The same reserve_space produced in the forward operation. input_backprop: The backprop to input in the forward pass. Has the same shape as input. input_h_backprop: The backprop to input_h in the forward pass. Has the same shape as input_h. input_c_backprop: The backprop to input_c in the forward pass. Has the same shape as input_c. params_backprop: The backprop to the params buffer in the forward pass. Has the same shape as params. Args input A Tensor. Must be one of the following types: half, float32, float64. input_h A Tensor. Must have the same type as input. input_c A Tensor. Must have the same type as input. params A Tensor. Must have the same type as input. sequence_lengths A Tensor of type int32. output A Tensor. Must have the same type as input. output_h A Tensor. Must have the same type as input. output_c A Tensor. Must have the same type as input. output_backprop A Tensor. Must have the same type as input. output_h_backprop A Tensor. Must have the same type as input. output_c_backprop A Tensor. Must have the same type as input. reserve_space A Tensor. Must have the same type as input. host_reserved A Tensor of type int8. rnn_mode An optional string from: "rnn_relu", "rnn_tanh", "lstm", "gru". Defaults to "lstm". input_mode An optional string from: "linear_input", "skip_input", "auto_select". Defaults to "linear_input". direction An optional string from: "unidirectional", "bidirectional". Defaults to "unidirectional". dropout An optional float. Defaults to 0. seed An optional int. Defaults to 0. seed2 An optional int. Defaults to 0. num_proj An optional int. Defaults to 0. time_major An optional bool. Defaults to True. name A name for the operation (optional). Returns A tuple of Tensor objects (input_backprop, input_h_backprop, input_c_backprop, params_backprop). input_backprop A Tensor. Has the same type as input. input_h_backprop A Tensor. Has the same type as input. input_c_backprop A Tensor. Has the same type as input. params_backprop A Tensor. Has the same type as input.
tensorflow.raw_ops.cudnnrnnbackpropv3
tf.raw_ops.CudnnRNNCanonicalToParams Converts CudnnRNN params from canonical form to usable form. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.CudnnRNNCanonicalToParams tf.raw_ops.CudnnRNNCanonicalToParams( num_layers, num_units, input_size, weights, biases, rnn_mode='lstm', input_mode='linear_input', direction='unidirectional', dropout=0, seed=0, seed2=0, name=None ) Writes a set of weights into the opaque params buffer so they can be used in upcoming training or inferences. Note that the params buffer may not be compatible across different GPUs. So any save and restoration should be converted to and from the canonical weights and biases. num_layers: Specifies the number of layers in the RNN model. num_units: Specifies the size of the hidden state. input_size: Specifies the size of the input state. weights: the canonical form of weights that can be used for saving and restoration. They are more likely to be compatible across different generations. biases: the canonical form of biases that can be used for saving and restoration. They are more likely to be compatible across different generations. num_params: number of parameter sets for all layers. Each layer may contain multiple parameter sets, with each set consisting of a weight matrix and a bias vector. rnn_mode: Indicates the type of the RNN model. input_mode: Indicate whether there is a linear projection between the input and The actual computation before the first layer. 'skip_input' is only allowed when input_size == num_units; 'auto_select' implies 'skip_input' when input_size == num_units; otherwise, it implies 'linear_input'. direction: Indicates whether a bidirectional model will be used. dir = (direction == bidirectional) ? 2 : 1 dropout: dropout probability. When set to 0., dropout is disabled. seed: the 1st part of a seed to initialize dropout. seed2: the 2nd part of a seed to initialize dropout. Args num_layers A Tensor of type int32. num_units A Tensor of type int32. input_size A Tensor of type int32. weights A list of at least 1 Tensor objects with the same type in: half, float32, float64. biases A list with the same length as weights of Tensor objects with the same type as weights. rnn_mode An optional string from: "rnn_relu", "rnn_tanh", "lstm", "gru". Defaults to "lstm". input_mode An optional string from: "linear_input", "skip_input", "auto_select". Defaults to "linear_input". direction An optional string from: "unidirectional", "bidirectional". Defaults to "unidirectional". dropout An optional float. Defaults to 0. 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 weights.
tensorflow.raw_ops.cudnnrnncanonicaltoparams
tf.raw_ops.CudnnRNNCanonicalToParamsV2 Converts CudnnRNN params from canonical form to usable form. It supports the projection in LSTM. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.CudnnRNNCanonicalToParamsV2 tf.raw_ops.CudnnRNNCanonicalToParamsV2( num_layers, num_units, input_size, weights, biases, rnn_mode='lstm', input_mode='linear_input', direction='unidirectional', dropout=0, seed=0, seed2=0, num_proj=0, name=None ) Writes a set of weights into the opaque params buffer so they can be used in upcoming training or inferences. Note that the params buffer may not be compatible across different GPUs. So any save and restoration should be converted to and from the canonical weights and biases. num_layers: Specifies the number of layers in the RNN model. num_units: Specifies the size of the hidden state. input_size: Specifies the size of the input state. weights: the canonical form of weights that can be used for saving and restoration. They are more likely to be compatible across different generations. biases: the canonical form of biases that can be used for saving and restoration. They are more likely to be compatible across different generations. num_params_weights: number of weight parameter matrix for all layers. num_params_biases: number of bias parameter vector for all layers. rnn_mode: Indicates the type of the RNN model. input_mode: Indicate whether there is a linear projection between the input and The actual computation before the first layer. 'skip_input' is only allowed when input_size == num_units; 'auto_select' implies 'skip_input' when input_size == num_units; otherwise, it implies 'linear_input'. direction: Indicates whether a bidirectional model will be used. dir = (direction == bidirectional) ? 2 : 1 dropout: dropout probability. When set to 0., dropout is disabled. seed: the 1st part of a seed to initialize dropout. seed2: the 2nd part of a seed to initialize dropout. num_proj: The output dimensionality for the projection matrices. If None or 0, no projection is performed. Args num_layers A Tensor of type int32. num_units A Tensor of type int32. input_size A Tensor of type int32. weights A list of at least 1 Tensor objects with the same type in: half, float32, float64. biases A list of at least 1 Tensor objects with the same type as weights. rnn_mode An optional string from: "rnn_relu", "rnn_tanh", "lstm", "gru". Defaults to "lstm". input_mode An optional string from: "linear_input", "skip_input", "auto_select". Defaults to "linear_input". direction An optional string from: "unidirectional", "bidirectional". Defaults to "unidirectional". dropout An optional float. Defaults to 0. seed An optional int. Defaults to 0. seed2 An optional int. Defaults to 0. num_proj An optional int. Defaults to 0. name A name for the operation (optional). Returns A Tensor. Has the same type as weights.
tensorflow.raw_ops.cudnnrnncanonicaltoparamsv2
tf.raw_ops.CudnnRNNParamsSize Computes size of weights that can be used by a Cudnn RNN model. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.CudnnRNNParamsSize tf.raw_ops.CudnnRNNParamsSize( num_layers, num_units, input_size, T, S, rnn_mode='lstm', input_mode='linear_input', direction='unidirectional', dropout=0, seed=0, seed2=0, num_proj=0, name=None ) Return the params size that can be used by the Cudnn RNN model. Subsequent weight allocation and initialization should use this size. num_layers: Specifies the number of layers in the RNN model. num_units: Specifies the size of the hidden state. input_size: Specifies the size of the input state. rnn_mode: Indicates the type of the RNN model. input_mode: Indicate whether there is a linear projection between the input and The actual computation before the first layer. 'skip_input' is only allowed when input_size == num_units; 'auto_select' implies 'skip_input' when input_size == num_units; otherwise, it implies 'linear_input'. direction: Indicates whether a bidirectional model will be used. dir = (direction == bidirectional) ? 2 : 1 dropout: dropout probability. When set to 0., dropout is disabled. seed: the 1st part of a seed to initialize dropout. seed2: the 2nd part of a seed to initialize dropout. params_size: The size of the params buffer that should be allocated and initialized for this RNN model. Note that this params buffer may not be compatible across GPUs. Please use CudnnRNNParamsWeights and CudnnRNNParamsBiases to save and restore them in a way that is compatible across different runs. Args num_layers A Tensor of type int32. num_units A Tensor of type int32. input_size A Tensor of type int32. T A tf.DType from: tf.half, tf.float32, tf.float64. S A tf.DType from: tf.int32, tf.int64. rnn_mode An optional string from: "rnn_relu", "rnn_tanh", "lstm", "gru". Defaults to "lstm". input_mode An optional string from: "linear_input", "skip_input", "auto_select". Defaults to "linear_input". direction An optional string from: "unidirectional", "bidirectional". Defaults to "unidirectional". dropout An optional float. Defaults to 0. seed An optional int. Defaults to 0. seed2 An optional int. Defaults to 0. num_proj An optional int. Defaults to 0. name A name for the operation (optional). Returns A Tensor of type S.
tensorflow.raw_ops.cudnnrnnparamssize
tf.raw_ops.CudnnRNNParamsToCanonical Retrieves CudnnRNN params in canonical form. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.CudnnRNNParamsToCanonical tf.raw_ops.CudnnRNNParamsToCanonical( num_layers, num_units, input_size, params, num_params, rnn_mode='lstm', input_mode='linear_input', direction='unidirectional', dropout=0, seed=0, seed2=0, name=None ) Retrieves a set of weights from the opaque params buffer that can be saved and restored in a way compatible with future runs. Note that the params buffer may not be compatible across different GPUs. So any save and restoration should be converted to and from the canonical weights and biases. num_layers: Specifies the number of layers in the RNN model. num_units: Specifies the size of the hidden state. input_size: Specifies the size of the input state. num_params: number of parameter sets for all layers. Each layer may contain multiple parameter sets, with each set consisting of a weight matrix and a bias vector. weights: the canonical form of weights that can be used for saving and restoration. They are more likely to be compatible across different generations. biases: the canonical form of biases that can be used for saving and restoration. They are more likely to be compatible across different generations. rnn_mode: Indicates the type of the RNN model. input_mode: Indicate whether there is a linear projection between the input and The actual computation before the first layer. 'skip_input' is only allowed when input_size == num_units; 'auto_select' implies 'skip_input' when input_size == num_units; otherwise, it implies 'linear_input'. direction: Indicates whether a bidirectional model will be used. dir = (direction == bidirectional) ? 2 : 1 dropout: dropout probability. When set to 0., dropout is disabled. seed: the 1st part of a seed to initialize dropout. seed2: the 2nd part of a seed to initialize dropout. Args num_layers A Tensor of type int32. num_units A Tensor of type int32. input_size A Tensor of type int32. params A Tensor. Must be one of the following types: half, float32, float64. num_params An int that is >= 1. rnn_mode An optional string from: "rnn_relu", "rnn_tanh", "lstm", "gru". Defaults to "lstm". input_mode An optional string from: "linear_input", "skip_input", "auto_select". Defaults to "linear_input". direction An optional string from: "unidirectional", "bidirectional". Defaults to "unidirectional". dropout An optional float. Defaults to 0. seed An optional int. Defaults to 0. seed2 An optional int. Defaults to 0. name A name for the operation (optional). Returns A tuple of Tensor objects (weights, biases). weights A list of num_params Tensor objects with the same type as params. biases A list of num_params Tensor objects with the same type as params.
tensorflow.raw_ops.cudnnrnnparamstocanonical
tf.raw_ops.CudnnRNNParamsToCanonicalV2 Retrieves CudnnRNN params in canonical form. It supports the projection in LSTM. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.CudnnRNNParamsToCanonicalV2 tf.raw_ops.CudnnRNNParamsToCanonicalV2( num_layers, num_units, input_size, params, num_params_weights, num_params_biases, rnn_mode='lstm', input_mode='linear_input', direction='unidirectional', dropout=0, seed=0, seed2=0, num_proj=0, name=None ) Retrieves a set of weights from the opaque params buffer that can be saved and restored in a way compatible with future runs. Note that the params buffer may not be compatible across different GPUs. So any save and restoration should be converted to and from the canonical weights and biases. num_layers: Specifies the number of layers in the RNN model. num_units: Specifies the size of the hidden state. input_size: Specifies the size of the input state. num_params_weights: number of weight parameter matrix for all layers. num_params_biases: number of bias parameter vector for all layers. weights: the canonical form of weights that can be used for saving and restoration. They are more likely to be compatible across different generations. biases: the canonical form of biases that can be used for saving and restoration. They are more likely to be compatible across different generations. rnn_mode: Indicates the type of the RNN model. input_mode: Indicate whether there is a linear projection between the input and The actual computation before the first layer. 'skip_input' is only allowed when input_size == num_units; 'auto_select' implies 'skip_input' when input_size == num_units; otherwise, it implies 'linear_input'. direction: Indicates whether a bidirectional model will be used. dir = (direction == bidirectional) ? 2 : 1 dropout: dropout probability. When set to 0., dropout is disabled. seed: the 1st part of a seed to initialize dropout. seed2: the 2nd part of a seed to initialize dropout. num_proj: The output dimensionality for the projection matrices. If None or 0, no projection is performed. Args num_layers A Tensor of type int32. num_units A Tensor of type int32. input_size A Tensor of type int32. params A Tensor. Must be one of the following types: half, float32, float64. num_params_weights An int that is >= 1. num_params_biases An int that is >= 1. rnn_mode An optional string from: "rnn_relu", "rnn_tanh", "lstm", "gru". Defaults to "lstm". input_mode An optional string from: "linear_input", "skip_input", "auto_select". Defaults to "linear_input". direction An optional string from: "unidirectional", "bidirectional". Defaults to "unidirectional". dropout An optional float. Defaults to 0. seed An optional int. Defaults to 0. seed2 An optional int. Defaults to 0. num_proj An optional int. Defaults to 0. name A name for the operation (optional). Returns A tuple of Tensor objects (weights, biases). weights A list of num_params_weights Tensor objects with the same type as params. biases A list of num_params_biases Tensor objects with the same type as params.
tensorflow.raw_ops.cudnnrnnparamstocanonicalv2
tf.raw_ops.CudnnRNNV2 A RNN backed by cuDNN. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.CudnnRNNV2 tf.raw_ops.CudnnRNNV2( input, input_h, input_c, params, rnn_mode='lstm', input_mode='linear_input', direction='unidirectional', dropout=0, seed=0, seed2=0, is_training=True, name=None ) Computes the RNN from the input and initial states, with respect to the params buffer. Produces one extra output "host_reserved" than CudnnRNN. rnn_mode: Indicates the type of the RNN model. input_mode: Indicates whether there is a linear projection between the input and the actual computation before the first layer. 'skip_input' is only allowed when input_size == num_units; 'auto_select' implies 'skip_input' when input_size == num_units; otherwise, it implies 'linear_input'. direction: Indicates whether a bidirectional model will be used. Should be "unidirectional" or "bidirectional". dropout: Dropout probability. When set to 0., dropout is disabled. seed: The 1st part of a seed to initialize dropout. seed2: The 2nd part of a seed to initialize dropout. input: A 3-D tensor with the shape of [seq_length, batch_size, input_size]. input_h: A 3-D tensor with the shape of [num_layer * dir, batch_size, num_units]. input_c: For LSTM, a 3-D tensor with the shape of [num_layer * dir, batch, num_units]. For other models, it is ignored. params: A 1-D tensor that contains the weights and biases in an opaque layout. The size must be created through CudnnRNNParamsSize, and initialized separately. Note that they might not be compatible across different generations. So it is a good idea to save and restore output: A 3-D tensor with the shape of [seq_length, batch_size, dir * num_units]. output_h: The same shape has input_h. output_c: The same shape as input_c for LSTM. An empty tensor for other models. is_training: Indicates whether this operation is used for inference or training. reserve_space: An opaque tensor that can be used in backprop calculation. It is only produced if is_training is true. host_reserved: An opaque tensor that can be used in backprop calculation. It is only produced if is_training is true. It is output on host memory rather than device memory. Args input A Tensor. Must be one of the following types: half, float32, float64. input_h A Tensor. Must have the same type as input. input_c A Tensor. Must have the same type as input. params A Tensor. Must have the same type as input. rnn_mode An optional string from: "rnn_relu", "rnn_tanh", "lstm", "gru". Defaults to "lstm". input_mode An optional string from: "linear_input", "skip_input", "auto_select". Defaults to "linear_input". direction An optional string from: "unidirectional", "bidirectional". Defaults to "unidirectional". dropout An optional float. Defaults to 0. seed An optional int. Defaults to 0. seed2 An optional int. Defaults to 0. is_training An optional bool. Defaults to True. name A name for the operation (optional). Returns A tuple of Tensor objects (output, output_h, output_c, reserve_space, host_reserved). output A Tensor. Has the same type as input. output_h A Tensor. Has the same type as input. output_c A Tensor. Has the same type as input. reserve_space A Tensor. Has the same type as input. host_reserved A Tensor of type int8.
tensorflow.raw_ops.cudnnrnnv2
tf.raw_ops.CudnnRNNV3 A RNN backed by cuDNN. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.CudnnRNNV3 tf.raw_ops.CudnnRNNV3( input, input_h, input_c, params, sequence_lengths, rnn_mode='lstm', input_mode='linear_input', direction='unidirectional', dropout=0, seed=0, seed2=0, num_proj=0, is_training=True, time_major=True, name=None ) Computes the RNN from the input and initial states, with respect to the params buffer. Accepts one extra input "sequence_lengths" than CudnnRNN. rnn_mode: Indicates the type of the RNN model. input_mode: Indicates whether there is a linear projection between the input and the actual computation before the first layer. 'skip_input' is only allowed when input_size == num_units; 'auto_select' implies 'skip_input' when input_size == num_units; otherwise, it implies 'linear_input'. direction: Indicates whether a bidirectional model will be used. Should be "unidirectional" or "bidirectional". dropout: Dropout probability. When set to 0., dropout is disabled. seed: The 1st part of a seed to initialize dropout. seed2: The 2nd part of a seed to initialize dropout. input: If time_major is true, this is a 3-D tensor with the shape of [seq_length, batch_size, input_size]. If time_major is false, the shape is [batch_size, seq_length, input_size]. input_h: If time_major is true, this is a 3-D tensor with the shape of [num_layer * dir, batch_size, num_units]. If time_major is false, the shape is [batch_size, num_layer * dir, num_units]. input_c: For LSTM, a 3-D tensor with the shape of [num_layer * dir, batch, num_units]. For other models, it is ignored. params: A 1-D tensor that contains the weights and biases in an opaque layout. The size must be created through CudnnRNNParamsSize, and initialized separately. Note that they might not be compatible across different generations. So it is a good idea to save and restore sequence_lengths: a vector of lengths of each input sequence. output: If time_major is true, this is a 3-D tensor with the shape of [seq_length, batch_size, dir * num_units]. If time_major is false, the shape is [batch_size, seq_length, dir * num_units]. output_h: The same shape has input_h. output_c: The same shape as input_c for LSTM. An empty tensor for other models. is_training: Indicates whether this operation is used for inference or training. time_major: Indicates whether the input/output format is time major or batch major. reserve_space: An opaque tensor that can be used in backprop calculation. It is only produced if is_training is true. Args input A Tensor. Must be one of the following types: half, float32, float64. input_h A Tensor. Must have the same type as input. input_c A Tensor. Must have the same type as input. params A Tensor. Must have the same type as input. sequence_lengths A Tensor of type int32. rnn_mode An optional string from: "rnn_relu", "rnn_tanh", "lstm", "gru". Defaults to "lstm". input_mode An optional string from: "linear_input", "skip_input", "auto_select". Defaults to "linear_input". direction An optional string from: "unidirectional", "bidirectional". Defaults to "unidirectional". dropout An optional float. Defaults to 0. seed An optional int. Defaults to 0. seed2 An optional int. Defaults to 0. num_proj An optional int. Defaults to 0. is_training An optional bool. Defaults to True. time_major An optional bool. Defaults to True. name A name for the operation (optional). Returns A tuple of Tensor objects (output, output_h, output_c, reserve_space, host_reserved). output A Tensor. Has the same type as input. output_h A Tensor. Has the same type as input. output_c A Tensor. Has the same type as input. reserve_space A Tensor. Has the same type as input. host_reserved A Tensor of type int8.
tensorflow.raw_ops.cudnnrnnv3
tf.raw_ops.Cumprod Compute the cumulative product of the tensor x along axis. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.Cumprod tf.raw_ops.Cumprod( x, axis, exclusive=False, reverse=False, name=None ) By default, this op performs an inclusive cumprod, which means that the first element of the input is identical to the first element of the output: tf.cumprod([a, b, c]) # => [a, a * b, a * b * c] By setting the exclusive kwarg to True, an exclusive cumprod is performed instead: tf.cumprod([a, b, c], exclusive=True) # => [1, a, a * b] By setting the reverse kwarg to True, the cumprod is performed in the opposite direction: tf.cumprod([a, b, c], reverse=True) # => [a * b * c, b * c, c] This is more efficient than using separate tf.reverse ops. The reverse and exclusive kwargs can also be combined: tf.cumprod([a, b, c], exclusive=True, reverse=True) # => [b * c, c, 1] Args x 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. Must be one of the following types: float32, float64, int64, int32, uint8, uint16, int16, int8, complex64, complex128, qint8, quint8, qint32, half. axis A Tensor. Must be one of the following types: int32, int64. A Tensor of type int32 (default: 0). Must be in the range [-rank(x), rank(x)). exclusive An optional bool. Defaults to False. If True, perform exclusive cumprod. reverse An optional bool. Defaults to False. A bool (default: False). name A name for the operation (optional). Returns A Tensor. Has the same type as x.
tensorflow.raw_ops.cumprod
tf.raw_ops.Cumsum Compute the cumulative sum of the tensor x along axis. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.Cumsum tf.raw_ops.Cumsum( x, axis, exclusive=False, reverse=False, name=None ) By default, this op performs an inclusive cumsum, which means that the first element of the input is identical to the first element of the output: tf.cumsum([a, b, c]) # => [a, a + b, a + b + c] By setting the exclusive kwarg to True, an exclusive cumsum is performed instead: tf.cumsum([a, b, c], exclusive=True) # => [0, a, a + b] By setting the reverse kwarg to True, the cumsum is performed in the opposite direction: tf.cumsum([a, b, c], reverse=True) # => [a + b + c, b + c, c] This is more efficient than using separate tf.reverse ops. The reverse and exclusive kwargs can also be combined: tf.cumsum([a, b, c], exclusive=True, reverse=True) # => [b + c, c, 0] Args x 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. Must be one of the following types: float32, float64, int64, int32, uint8, uint16, int16, int8, complex64, complex128, qint8, quint8, qint32, half. axis A Tensor. Must be one of the following types: int32, int64. A Tensor of type int32 (default: 0). Must be in the range [-rank(x), rank(x)). exclusive An optional bool. Defaults to False. If True, perform exclusive cumsum. reverse An optional bool. Defaults to False. A bool (default: False). name A name for the operation (optional). Returns A Tensor. Has the same type as x.
tensorflow.raw_ops.cumsum
tf.raw_ops.CumulativeLogsumexp Compute the cumulative product of the tensor x along axis. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.CumulativeLogsumexp tf.raw_ops.CumulativeLogsumexp( x, axis, exclusive=False, reverse=False, name=None ) By default, this op performs an inclusive cumulative log-sum-exp, which means that the first element of the input is identical to the first element of the output: tf.math.cumulative_logsumexp([a, b, c]) # => [a, log(exp(a) + exp(b)), log(exp(a) + exp(b) + exp(c))] By setting the exclusive kwarg to True, an exclusive cumulative log-sum-exp is performed instead: tf.cumulative_logsumexp([a, b, c], exclusive=True) # => [-inf, a, log(exp(a) * exp(b))] Note that the neutral element of the log-sum-exp operation is -inf, however, for performance reasons, the minimal value representable by the floating point type is used instead. By setting the reverse kwarg to True, the cumulative log-sum-exp is performed in the opposite direction. Args x A Tensor. Must be one of the following types: half, float32, float64. A Tensor. Must be one of the following types: float16, float32, float64. axis A Tensor. Must be one of the following types: int32, int64. A Tensor of type int32 (default: 0). Must be in the range [-rank(x), rank(x)). exclusive An optional bool. Defaults to False. If True, perform exclusive cumulative log-sum-exp. reverse An optional bool. Defaults to False. A bool (default: False). name A name for the operation (optional). Returns A Tensor. Has the same type as x.
tensorflow.raw_ops.cumulativelogsumexp
tf.raw_ops.DataFormatDimMap Returns the dimension index in the destination data format given the one in View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.DataFormatDimMap tf.raw_ops.DataFormatDimMap( x, src_format='NHWC', dst_format='NCHW', name=None ) the source data format. Args x A Tensor. Must be one of the following types: int32, int64. A Tensor with each element as a dimension index in source data format. Must be in the range [-4, 4). src_format An optional string. Defaults to "NHWC". source data format. dst_format An optional string. Defaults to "NCHW". destination data format. name A name for the operation (optional). Returns A Tensor. Has the same type as x.
tensorflow.raw_ops.dataformatdimmap
tf.raw_ops.DataFormatVecPermute Permute input tensor from src_format to dst_format. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.DataFormatVecPermute tf.raw_ops.DataFormatVecPermute( x, src_format='NHWC', dst_format='NCHW', name=None ) Input tensor must be a vector of size 4, or a 4x2 tensor. For example, with src_format of NHWC, dst_format of NCHW, and inputs: [1, 2, 3, 4] and [[1, 2, 3, 4], [5, 6, 7, 8]] , the outputs will be (respectively): [1, 4, 2, 3] and [[1, 4, 2, 3], [5, 8, 6, 7]] Args x A Tensor. Must be one of the following types: int32, int64. Vector of size 4 or Tensor of shape (4, 2) in source data format. src_format An optional string. Defaults to "NHWC". source data format. dst_format An optional string. Defaults to "NCHW". destination data format. name A name for the operation (optional). Returns A Tensor. Has the same type as x.
tensorflow.raw_ops.dataformatvecpermute
tf.raw_ops.DataServiceDataset Creates a dataset that reads data from the tf.data service. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.DataServiceDataset tf.raw_ops.DataServiceDataset( dataset_id, processing_mode, address, protocol, job_name, max_outstanding_requests, iteration_counter, output_types, output_shapes, task_refresh_interval_hint_ms=-1, name=None ) Args dataset_id A Tensor of type int64. processing_mode A Tensor of type string. address A Tensor of type string. protocol A Tensor of type string. job_name A Tensor of type string. max_outstanding_requests A Tensor of type int64. iteration_counter A Tensor of type resource. output_types A list of tf.DTypes that has length >= 1. output_shapes A list of shapes (each a tf.TensorShape or list of ints) that has length >= 1. task_refresh_interval_hint_ms An optional int. Defaults to -1. name A name for the operation (optional). Returns A Tensor of type variant.
tensorflow.raw_ops.dataservicedataset
tf.raw_ops.DatasetCardinality Returns the cardinality of input_dataset. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.DatasetCardinality tf.raw_ops.DatasetCardinality( input_dataset, name=None ) Returns the cardinality of input_dataset. Args input_dataset A Tensor of type variant. A variant tensor representing the dataset to return cardinality for. name A name for the operation (optional). Returns A Tensor of type int64.
tensorflow.raw_ops.datasetcardinality
tf.raw_ops.DatasetFromGraph Creates a dataset from the given graph_def. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.DatasetFromGraph tf.raw_ops.DatasetFromGraph( graph_def, name=None ) Creates a dataset from the provided graph_def. Args graph_def A Tensor of type string. The graph representation of the dataset (as serialized GraphDef). name A name for the operation (optional). Returns A Tensor of type variant.
tensorflow.raw_ops.datasetfromgraph
tf.raw_ops.DatasetToGraph Returns a serialized GraphDef representing input_dataset. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.DatasetToGraph tf.raw_ops.DatasetToGraph( input_dataset, stateful_whitelist=[], allow_stateful=False, strip_device_assignment=False, name=None ) Returns a graph representation for input_dataset. Args input_dataset A Tensor of type variant. A variant tensor representing the dataset to return the graph representation for. stateful_whitelist An optional list of strings. Defaults to []. allow_stateful An optional bool. Defaults to False. strip_device_assignment An optional bool. Defaults to False. name A name for the operation (optional). Returns A Tensor of type string.
tensorflow.raw_ops.datasettograph
tf.raw_ops.DatasetToGraphV2 Returns a serialized GraphDef representing input_dataset. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.DatasetToGraphV2 tf.raw_ops.DatasetToGraphV2( input_dataset, external_state_policy=0, strip_device_assignment=False, name=None ) Returns a graph representation for input_dataset. Args input_dataset A Tensor of type variant. A variant tensor representing the dataset to return the graph representation for. external_state_policy An optional int. Defaults to 0. strip_device_assignment An optional bool. Defaults to False. name A name for the operation (optional). Returns A Tensor of type string.
tensorflow.raw_ops.datasettographv2
tf.raw_ops.DatasetToSingleElement Outputs the single element from the given dataset. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.DatasetToSingleElement tf.raw_ops.DatasetToSingleElement( dataset, output_types, output_shapes, name=None ) Args dataset A Tensor of type variant. A handle to a dataset that contains a single element. output_types A list of tf.DTypes that has length >= 1. output_shapes A list of shapes (each a tf.TensorShape or list of ints) that has length >= 1. name A name for the operation (optional). Returns A list of Tensor objects of type output_types.
tensorflow.raw_ops.datasettosingleelement
tf.raw_ops.DatasetToTFRecord Writes the given dataset to the given file using the TFRecord format. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.DatasetToTFRecord tf.raw_ops.DatasetToTFRecord( input_dataset, filename, compression_type, name=None ) Args input_dataset A Tensor of type variant. A variant tensor representing the dataset to write. filename A Tensor of type string. A scalar string tensor representing the filename to use. compression_type A Tensor of type string. A scalar string tensor containing either (i) the empty string (no compression), (ii) "ZLIB", or (iii) "GZIP". name A name for the operation (optional). Returns The created Operation.
tensorflow.raw_ops.datasettotfrecord
tf.raw_ops.Dawsn View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.Dawsn tf.raw_ops.Dawsn( x, name=None ) Args x A Tensor. Must be one of the following types: bfloat16, half, float32, float64. name A name for the operation (optional). Returns A Tensor. Has the same type as x.
tensorflow.raw_ops.dawsn
tf.raw_ops.DebugGradientIdentity Identity op for gradient debugging. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.DebugGradientIdentity tf.raw_ops.DebugGradientIdentity( input, name=None ) This op is hidden from public in Python. It is used by TensorFlow Debugger to register gradient tensors for gradient debugging. This op operates on non-reference-type tensors. Args input A Tensor. name A name for the operation (optional). Returns A Tensor. Has the same type as input.
tensorflow.raw_ops.debuggradientidentity
tf.raw_ops.DebugGradientRefIdentity Identity op for gradient debugging. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.DebugGradientRefIdentity tf.raw_ops.DebugGradientRefIdentity( input, name=None ) This op is hidden from public in Python. It is used by TensorFlow Debugger to register gradient tensors for gradient debugging. This op operates on reference-type tensors. 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.debuggradientrefidentity
tf.raw_ops.DebugIdentity Provides an identity mapping of the non-Ref type input tensor for debugging. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.DebugIdentity tf.raw_ops.DebugIdentity( input, device_name='', tensor_name='', debug_urls=[], gated_grpc=False, name=None ) Provides an identity mapping of the non-Ref type input tensor for debugging. Args input A Tensor. Input tensor, non-Reference type device_name An optional string. Defaults to "". Name of the device on which the tensor resides. tensor_name An optional string. Defaults to "". Name of the input tensor. debug_urls An optional list of strings. Defaults to []. List of URLs to debug targets, e.g., file:///foo/tfdbg_dump, grpc:://localhost:11011 gated_grpc An optional bool. Defaults to False. Whether this op will be gated. If any of the debug_urls of this debug node is of the grpc:// scheme, when the value of this attribute is set to True, the data will not actually be sent via the grpc stream unless this debug op has been enabled at the debug_url. If all of the debug_urls of this debug node are of the grpc:// scheme and the debug op is enabled at none of them, the output will be an empty Tensor. name A name for the operation (optional). Returns A Tensor. Has the same type as input.
tensorflow.raw_ops.debugidentity
tf.raw_ops.DebugIdentityV2 Debug Identity V2 Op. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.DebugIdentityV2 tf.raw_ops.DebugIdentityV2( input, tfdbg_context_id='', op_name='', output_slot=-1, tensor_debug_mode=-1, debug_urls=[], circular_buffer_size=1000, tfdbg_run_id='', name=None ) Provides an identity mapping from input to output, while writing the content of the input tensor by calling DebugEventsWriter. The semantics of the input tensor depends on tensor_debug_mode. In typical usage, the input tensor comes directly from the user computation only when graph_debug_mode is FULL_TENSOR (see protobuf/debug_event.proto for a list of all the possible values of graph_debug_mode). For the other debug modes, the input tensor should be produced by an additional op or subgraph that computes summary information about one or more tensors. Args input A Tensor. Input tensor, non-Reference type tfdbg_context_id An optional string. Defaults to "". A tfdbg-generated ID for the context that the op belongs to, e.g., a concrete compiled tf.function. op_name An optional string. Defaults to "". Optional. Name of the op that the debug op is concerned with. Used only for single-tensor trace. output_slot An optional int. Defaults to -1. Optional. Output slot index of the tensor that the debug op is concerned with. Used only for single-tensor trace. tensor_debug_mode An optional int. Defaults to -1. TensorDebugMode enum value. See debug_event.proto for details. debug_urls An optional list of strings. Defaults to []. List of URLs to debug targets, e.g., file:///foo/tfdbg_dump. circular_buffer_size An optional int. Defaults to 1000. tfdbg_run_id An optional string. Defaults to "". name A name for the operation (optional). Returns A Tensor. Has the same type as input.
tensorflow.raw_ops.debugidentityv2
tf.raw_ops.DebugNanCount Debug NaN Value Counter Op. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.DebugNanCount tf.raw_ops.DebugNanCount( input, device_name='', tensor_name='', debug_urls=[], gated_grpc=False, name=None ) Counts number of NaNs in the input tensor, for debugging. Args input A Tensor. Input tensor, non-Reference type. device_name An optional string. Defaults to "". tensor_name An optional string. Defaults to "". Name of the input tensor. debug_urls An optional list of strings. Defaults to []. List of URLs to debug targets, e.g., file:///foo/tfdbg_dump, grpc:://localhost:11011. gated_grpc An optional bool. Defaults to False. Whether this op will be gated. If any of the debug_urls of this debug node is of the grpc:// scheme, when the value of this attribute is set to True, the data will not actually be sent via the grpc stream unless this debug op has been enabled at the debug_url. If all of the debug_urls of this debug node are of the grpc:// scheme and the debug op is enabled at none of them, the output will be an empty Tensor. name A name for the operation (optional). Returns A Tensor of type int64.
tensorflow.raw_ops.debugnancount
tf.raw_ops.DebugNumericSummary Debug Numeric Summary Op. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.DebugNumericSummary tf.raw_ops.DebugNumericSummary( input, device_name='', tensor_name='', debug_urls=[], lower_bound=float('-inf'), upper_bound=float('inf'), mute_if_healthy=False, gated_grpc=False, name=None ) Provide a basic summary of numeric value types, range and distribution. output: A double tensor of shape [14 + nDimensions], where nDimensions is the number of dimensions of the tensor's shape. The elements of output are: [0]: is initialized (1.0) or not (0.0). [1]: total number of elements [2]: NaN element count [3]: generalized -inf count: elements <= lower_bound. lower_bound is -inf by default. [4]: negative element count (excluding -inf), if lower_bound is the default -inf. Otherwise, this is the count of elements > lower_bound and < 0. [5]: zero element count [6]: positive element count (excluding +inf), if upper_bound is the default +inf. Otherwise, this is the count of elements < upper_bound and > 0. [7]: generalized +inf count, elements >= upper_bound. upper_bound is +inf by default. Output elements [1:8] are all zero, if the tensor is uninitialized. [8]: minimum of all non-inf and non-NaN elements. If uninitialized or no such element exists: +inf. [9]: maximum of all non-inf and non-NaN elements. If uninitialized or no such element exists: -inf. [10]: mean of all non-inf and non-NaN elements. If uninitialized or no such element exists: NaN. [11]: variance of all non-inf and non-NaN elements. If uninitialized or no such element exists: NaN. [12]: Data type of the tensor encoded as an enum integer. See the DataType proto for more details. [13]: Number of dimensions of the tensor (ndims). [14+]: Sizes of the dimensions. Args input A Tensor. Input tensor, non-Reference type. device_name An optional string. Defaults to "". tensor_name An optional string. Defaults to "". Name of the input tensor. debug_urls An optional list of strings. Defaults to []. List of URLs to debug targets, e.g., file:///foo/tfdbg_dump, grpc:://localhost:11011. lower_bound An optional float. Defaults to float('-inf'). (float) The lower bound <= which values will be included in the generalized -inf count. Default: -inf. upper_bound An optional float. Defaults to float('inf'). (float) The upper bound >= which values will be included in the generalized +inf count. Default: +inf. mute_if_healthy An optional bool. Defaults to False. (bool) Do not send data to the debug URLs unless at least one of elements [2], [3] and 7 is non-zero. gated_grpc An optional bool. Defaults to False. Whether this op will be gated. If any of the debug_urls of this debug node is of the grpc:// scheme, when the value of this attribute is set to True, the data will not actually be sent via the grpc stream unless this debug op has been enabled at the debug_url. If all of the debug_urls of this debug node are of the grpc:// scheme and the debug op is enabled at none of them, the output will be an empty Tensor. name A name for the operation (optional). Returns A Tensor of type float64.
tensorflow.raw_ops.debugnumericsummary
tf.raw_ops.DebugNumericSummaryV2 Debug Numeric Summary V2 Op. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.DebugNumericSummaryV2 tf.raw_ops.DebugNumericSummaryV2( input, output_dtype=tf.dtypes.float32, tensor_debug_mode=-1, tensor_id=-1, name=None ) Computes a numeric summary of the input tensor. The shape of the output depends on the tensor_debug_mode attribute. This op is used internally by TensorFlow Debugger (tfdbg) v2. Args input A Tensor. Input tensor, to be summarized by the op. output_dtype An optional tf.DType from: tf.float32, tf.float64. Defaults to tf.float32. Optional. The type of the output. Can be float32 or float64 (default: float32). tensor_debug_mode An optional int. Defaults to -1. Tensor debug mode: the mode in which the input tensor is summarized by the op. See the TensorDebugMode enum in tensorflow/core/protobuf/debug_event.proto for details. Supported values: 2 (CURT_HEALTH): Output a float32/64 tensor of shape [2]. The 1st element is the tensor_id, if provided, and -1 otherwise. The 2nd element is a bit which is set to 1 if the input tensor has an infinity or nan value, or zero otherwise. 3 (CONCISE_HEALTH): Output a float32/64 tensor of shape [5]. The 1st element is the tensor_id, if provided, and -1 otherwise. The remaining four slots are the total number of elements, -infs, +infs, and nans in the input tensor respectively. 4 (FULL_HEALTH): Output a float32/64 tensor of shape [11]. The 1st element is the tensor_id, if provided, and -1 otherwise. The 2nd element is the device_id, if provided, and -1 otherwise. The 3rd element holds the datatype value of the input tensor as according to the enumerated type in tensorflow/core/framework/types.proto. The remaining elements hold the total number of elements, -infs, +infs, nans, negative finite numbers, zeros, and positive finite numbers in the input tensor respectively. 5 (SHAPE): Output a float32/64 tensor of shape [10]. The 1st element is the tensor_id, if provided, and -1 otherwise. The 2nd element holds the datatype value of the input tensor as according to the enumerated type in tensorflow/core/framework/types.proto. The 3rd element holds the rank of the tensor. The 4th element holds the number of elements within the tensor. Finally the remaining 6 elements hold the shape of the tensor. If the rank of the tensor is lower than 6, the shape is right padded with zeros. If the rank is greater than 6, the head of the shape is truncated. 6 (FULL_NUMERICS): Output a float32/64 tensor of shape [22]. The 1st element is the tensor_id, if provided, and -1 otherwise. The 2nd element is the device_id, if provided, and -1 otherwise. The 3rd element holds the datatype value of the input tensor as according to the enumerated type in tensorflow/core/framework/types.proto. The 4th element holds the rank of the tensor. The 5th to 11th elements hold the shape of the tensor. If the rank of the tensor is lower than 6, the shape is right padded with zeros. If the rank is greater than 6, the head of the shape is truncated. The 12th to 18th elements hold the number of elements, -infs, +infs, nans, denormal floats, negative finite numbers, zeros, and positive finite numbers in the input tensor respectively. The final four elements hold the min value, max value, mean, and variance of the input tensor. 8 (REDUCE_INF_NAN_THREE_SLOTS): Output a float32/64 tensor of shape [3]. The 1st element is -inf if any elements of the input tensor is -inf, or zero otherwise. The 2nd element is +inf if any elements of the input tensor is +inf, or zero otherwise. The 3rd element is nan if any element of the input tensor is nan, or zero otherwise. tensor_id An optional int. Defaults to -1. Optional. An integer identifier for the tensor being summarized by this op. name A name for the operation (optional). Returns A Tensor of type output_dtype.
tensorflow.raw_ops.debugnumericsummaryv2
tf.raw_ops.DecodeAndCropJpeg Decode and Crop a JPEG-encoded image to a uint8 tensor. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.DecodeAndCropJpeg tf.raw_ops.DecodeAndCropJpeg( contents, crop_window, channels=0, ratio=1, fancy_upscaling=True, try_recover_truncated=False, acceptable_fraction=1, dct_method='', name=None ) The attr channels indicates the desired number of color channels for the decoded image. Accepted values are: 0: Use the number of channels in the JPEG-encoded image. 1: output a grayscale image. 3: output an RGB image. If needed, the JPEG-encoded image is transformed to match the requested number of color channels. The attr ratio allows downscaling the image by an integer factor during decoding. Allowed values are: 1, 2, 4, and 8. This is much faster than downscaling the image later. It is equivalent to a combination of decode and crop, but much faster by only decoding partial jpeg image. Args contents A Tensor of type string. 0-D. The JPEG-encoded image. crop_window A Tensor of type int32. 1-D. The crop window: [crop_y, crop_x, crop_height, crop_width]. channels An optional int. Defaults to 0. Number of color channels for the decoded image. ratio An optional int. Defaults to 1. Downscaling ratio. fancy_upscaling An optional bool. Defaults to True. If true use a slower but nicer upscaling of the chroma planes (yuv420/422 only). try_recover_truncated An optional bool. Defaults to False. If true try to recover an image from truncated input. acceptable_fraction An optional float. Defaults to 1. The minimum required fraction of lines before a truncated input is accepted. dct_method An optional string. Defaults to "". string specifying a hint about the algorithm used for decompression. Defaults to "" which maps to a system-specific default. Currently valid values are ["INTEGER_FAST", "INTEGER_ACCURATE"]. The hint may be ignored (e.g., the internal jpeg library changes to a version that does not have that specific option.) name A name for the operation (optional). Returns A Tensor of type uint8.
tensorflow.raw_ops.decodeandcropjpeg
tf.raw_ops.DecodeBase64 Decode web-safe base64-encoded strings. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.DecodeBase64 tf.raw_ops.DecodeBase64( input, name=None ) Input may or may not have padding at the end. See EncodeBase64 for padding. Web-safe means that input must use - and _ instead of + and /. Args input A Tensor of type string. Base64 strings to decode. name A name for the operation (optional). Returns A Tensor of type string.
tensorflow.raw_ops.decodebase64
tf.raw_ops.DecodeBmp Decode the first frame of a BMP-encoded image to a uint8 tensor. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.DecodeBmp tf.raw_ops.DecodeBmp( contents, channels=0, name=None ) The attr channels indicates the desired number of color channels for the decoded image. Accepted values are: 0: Use the number of channels in the BMP-encoded image. 3: output an RGB image. 4: output an RGBA image. Args contents A Tensor of type string. 0-D. The BMP-encoded image. channels An optional int. Defaults to 0. name A name for the operation (optional). Returns A Tensor of type uint8.
tensorflow.raw_ops.decodebmp
tf.raw_ops.DecodeCompressed Decompress strings. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.DecodeCompressed tf.raw_ops.DecodeCompressed( bytes, compression_type='', name=None ) This op decompresses each element of the bytes input Tensor, which is assumed to be compressed using the given compression_type. The output is a string Tensor of the same shape as bytes, each element containing the decompressed data from the corresponding element in bytes. Args bytes A Tensor of type string. A Tensor of string which is compressed. compression_type An optional string. Defaults to "". A scalar containing either (i) the empty string (no compression), (ii) "ZLIB", or (iii) "GZIP". name A name for the operation (optional). Returns A Tensor of type string.
tensorflow.raw_ops.decodecompressed
tf.raw_ops.DecodeCSV Convert CSV records to tensors. Each column maps to one tensor. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.DecodeCSV tf.raw_ops.DecodeCSV( records, record_defaults, field_delim=',', use_quote_delim=True, na_value='', select_cols=[], name=None ) RFC 4180 format is expected for the CSV records. (https://tools.ietf.org/html/rfc4180) Note that we allow leading and trailing spaces with int or float field. Args records A Tensor of type string. Each string is a record/row in the csv and all records should have the same format. record_defaults A list of Tensor objects with types from: float32, float64, int32, int64, string. One tensor per column of the input record, with either a scalar default value for that column or an empty vector if the column is required. field_delim An optional string. Defaults to ",". char delimiter to separate fields in a record. use_quote_delim An optional bool. Defaults to True. If false, treats double quotation marks as regular characters inside of the string fields (ignoring RFC 4180, Section 2, Bullet 5). na_value An optional string. Defaults to "". Additional string to recognize as NA/NaN. select_cols An optional list of ints. Defaults to []. name A name for the operation (optional). Returns A list of Tensor objects. Has the same type as record_defaults.
tensorflow.raw_ops.decodecsv
tf.raw_ops.DecodeGif Decode the frame(s) of a GIF-encoded image to a uint8 tensor. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.DecodeGif tf.raw_ops.DecodeGif( contents, name=None ) GIF images with frame or transparency compression are not supported. On Linux and MacOS systems, convert animated GIFs from compressed to uncompressed by running: convert $src.gif -coalesce $dst.gif This op also supports decoding JPEGs and PNGs, though it is cleaner to use tf.io.decode_image. Args contents A Tensor of type string. 0-D. The GIF-encoded image. name A name for the operation (optional). Returns A Tensor of type uint8.
tensorflow.raw_ops.decodegif
tf.raw_ops.DecodeImage Function for decode_bmp, decode_gif, decode_jpeg, and decode_png. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.DecodeImage tf.raw_ops.DecodeImage( contents, channels=0, dtype=tf.dtypes.uint8, expand_animations=True, name=None ) Detects whether an image is a BMP, GIF, JPEG, or PNG, and performs the appropriate operation to convert the input bytes string into a Tensor of type dtype. Note: decode_gif returns a 4-D array [num_frames, height, width, 3], as opposed to decode_bmp, decode_jpeg and decode_png, which return 3-D arrays [height, width, num_channels]. Make sure to take this into account when constructing your graph if you are intermixing GIF files with BMP, JPEG, and/or PNG files. Alternately, set the expand_animations argument of this function to False, in which case the op will return 3-dimensional tensors and will truncate animated GIF files to the first frame. Note: If the first frame of an animated GIF does not occupy the entire canvas (maximum frame width x maximum frame height), then it fills the unoccupied areas (in the first frame) with zeros (black). For frames after the first frame that does not occupy the entire canvas, it uses the previous frame to fill the unoccupied areas. Args contents A Tensor of type string. 0-D. The encoded image bytes. channels An optional int. Defaults to 0. Number of color channels for the decoded image. dtype An optional tf.DType from: tf.uint8, tf.uint16, tf.float32. Defaults to tf.uint8. The desired DType of the returned Tensor. expand_animations An optional bool. Defaults to True. Controls the output shape of the returned op. If True, the returned op will produce a 3-D tensor for PNG, JPEG, and BMP files; and a 4-D tensor for all GIFs, whether animated or not. If, False, the returned op will produce a 3-D tensor for all file types and will truncate animated GIFs to the first frame. name A name for the operation (optional). Returns A Tensor of type dtype.
tensorflow.raw_ops.decodeimage
tf.raw_ops.DecodeJpeg Decode a JPEG-encoded image to a uint8 tensor. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.DecodeJpeg tf.raw_ops.DecodeJpeg( contents, channels=0, ratio=1, fancy_upscaling=True, try_recover_truncated=False, acceptable_fraction=1, dct_method='', name=None ) The attr channels indicates the desired number of color channels for the decoded image. Accepted values are: 0: Use the number of channels in the JPEG-encoded image. 1: output a grayscale image. 3: output an RGB image. If needed, the JPEG-encoded image is transformed to match the requested number of color channels. The attr ratio allows downscaling the image by an integer factor during decoding. Allowed values are: 1, 2, 4, and 8. This is much faster than downscaling the image later. This op also supports decoding PNGs and non-animated GIFs since the interface is the same, though it is cleaner to use tf.io.decode_image. Args contents A Tensor of type string. 0-D. The JPEG-encoded image. channels An optional int. Defaults to 0. Number of color channels for the decoded image. ratio An optional int. Defaults to 1. Downscaling ratio. fancy_upscaling An optional bool. Defaults to True. If true use a slower but nicer upscaling of the chroma planes (yuv420/422 only). try_recover_truncated An optional bool. Defaults to False. If true try to recover an image from truncated input. acceptable_fraction An optional float. Defaults to 1. The minimum required fraction of lines before a truncated input is accepted. dct_method An optional string. Defaults to "". string specifying a hint about the algorithm used for decompression. Defaults to "" which maps to a system-specific default. Currently valid values are ["INTEGER_FAST", "INTEGER_ACCURATE"]. The hint may be ignored (e.g., the internal jpeg library changes to a version that does not have that specific option.) name A name for the operation (optional). Returns A Tensor of type uint8.
tensorflow.raw_ops.decodejpeg
tf.raw_ops.DecodeJSONExample Convert JSON-encoded Example records to binary protocol buffer strings. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.DecodeJSONExample tf.raw_ops.DecodeJSONExample( json_examples, name=None ) This op translates a tensor containing Example records, encoded using the standard JSON mapping, into a tensor containing the same records encoded as binary protocol buffers. The resulting tensor can then be fed to any of the other Example-parsing ops. Args json_examples A Tensor of type string. Each string is a JSON object serialized according to the JSON mapping of the Example proto. name A name for the operation (optional). Returns A Tensor of type string.
tensorflow.raw_ops.decodejsonexample
tf.raw_ops.DecodePaddedRaw Reinterpret the bytes of a string as a vector of numbers. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.DecodePaddedRaw tf.raw_ops.DecodePaddedRaw( input_bytes, fixed_length, out_type, little_endian=True, name=None ) Args input_bytes A Tensor of type string. Tensor of string to be decoded. fixed_length A Tensor of type int32. Length in bytes for each element of the decoded output. Must be a multiple of the size of the output type. out_type A tf.DType from: tf.half, tf.float32, tf.float64, tf.int32, tf.uint16, tf.uint8, tf.int16, tf.int8, tf.int64. little_endian An optional bool. Defaults to True. Whether the input input_bytes is in little-endian order. Ignored for out_type values that are stored in a single byte, like uint8 name A name for the operation (optional). Returns A Tensor of type out_type.
tensorflow.raw_ops.decodepaddedraw
tf.raw_ops.DecodePng Decode a PNG-encoded image to a uint8 or uint16 tensor. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.DecodePng tf.raw_ops.DecodePng( contents, channels=0, dtype=tf.dtypes.uint8, name=None ) The attr channels indicates the desired number of color channels for the decoded image. Accepted values are: 0: Use the number of channels in the PNG-encoded image. 1: output a grayscale image. 3: output an RGB image. 4: output an RGBA image. If needed, the PNG-encoded image is transformed to match the requested number of color channels. This op also supports decoding JPEGs and non-animated GIFs since the interface is the same, though it is cleaner to use tf.io.decode_image. Args contents A Tensor of type string. 0-D. The PNG-encoded image. channels An optional int. Defaults to 0. Number of color channels for the decoded image. dtype An optional tf.DType from: tf.uint8, tf.uint16. Defaults to tf.uint8. name A name for the operation (optional). Returns A Tensor of type dtype.
tensorflow.raw_ops.decodepng
tf.raw_ops.DecodeProtoV2 The op extracts fields from a serialized protocol buffers message into tensors. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.DecodeProtoV2 tf.raw_ops.DecodeProtoV2( bytes, message_type, field_names, output_types, descriptor_source='local://', message_format='binary', sanitize=False, name=None ) The decode_proto op extracts fields from a serialized protocol buffers message into tensors. The fields in field_names are decoded and converted to the corresponding output_types if possible. A message_type name must be provided to give context for the field names. The actual message descriptor can be looked up either in the linked-in descriptor pool or a filename provided by the caller using the descriptor_source attribute. Each output tensor is a dense tensor. This means that it is padded to hold the largest number of repeated elements seen in the input minibatch. (The shape is also padded by one to prevent zero-sized dimensions). The actual repeat counts for each example in the minibatch can be found in the sizes output. In many cases the output of decode_proto is fed immediately into tf.squeeze if missing values are not a concern. When using tf.squeeze, always pass the squeeze dimension explicitly to avoid surprises. For the most part, the mapping between Proto field types and TensorFlow dtypes is straightforward. However, there are a few special cases: A proto field that contains a submessage or group can only be converted to DT_STRING (the serialized submessage). This is to reduce the complexity of the API. The resulting string can be used as input to another instance of the decode_proto op. TensorFlow lacks support for unsigned integers. The ops represent uint64 types as a DT_INT64 with the same twos-complement bit pattern (the obvious way). Unsigned int32 values can be represented exactly by specifying type DT_INT64, or using twos-complement if the caller specifies DT_INT32 in the output_types attribute. Both binary and text proto serializations are supported, and can be chosen using the format attribute. The descriptor_source attribute selects the source of protocol descriptors to consult when looking up message_type. This may be: An empty string or "local://", in which case protocol descriptors are created for C++ (not Python) proto definitions linked to the binary. A file, in which case protocol descriptors are created from the file, which is expected to contain a FileDescriptorSet serialized as a string. NOTE: You can build a descriptor_source file using the --descriptor_set_out and --include_imports options to the protocol compiler protoc. A "bytes://", in which protocol descriptors are created from <bytes>, which is expected to be a FileDescriptorSet serialized as a string. Args bytes A Tensor of type string. Tensor of serialized protos with shape batch_shape. message_type A string. Name of the proto message type to decode. field_names A list of strings. List of strings containing proto field names. An extension field can be decoded by using its full name, e.g. EXT_PACKAGE.EXT_FIELD_NAME. output_types A list of tf.DTypes. List of TF types to use for the respective field in field_names. descriptor_source An optional string. Defaults to "local://". Either the special value local:// or a path to a file containing a serialized FileDescriptorSet. message_format An optional string. Defaults to "binary". Either binary or text. sanitize An optional bool. Defaults to False. Whether to sanitize the result or not. name A name for the operation (optional). Returns A tuple of Tensor objects (sizes, values). sizes A Tensor of type int32. values A list of Tensor objects of type output_types.
tensorflow.raw_ops.decodeprotov2
tf.raw_ops.DecodeRaw Reinterpret the bytes of a string as a vector of numbers. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.DecodeRaw tf.raw_ops.DecodeRaw( bytes, out_type, little_endian=True, name=None ) Args bytes A Tensor of type string. All the elements must have the same length. out_type A tf.DType from: tf.half, tf.float32, tf.float64, tf.int32, tf.uint16, tf.uint8, tf.int16, tf.int8, tf.int64, tf.complex64, tf.complex128, tf.bool. little_endian An optional bool. Defaults to True. Whether the input bytes are in little-endian order. Ignored for out_type values that are stored in a single byte like uint8. name A name for the operation (optional). Returns A Tensor of type out_type.
tensorflow.raw_ops.decoderaw
tf.raw_ops.DecodeWav Decode a 16-bit PCM WAV file to a float tensor. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.DecodeWav tf.raw_ops.DecodeWav( contents, desired_channels=-1, desired_samples=-1, name=None ) The -32768 to 32767 signed 16-bit values will be scaled to -1.0 to 1.0 in float. When desired_channels is set, if the input contains fewer channels than this then the last channel will be duplicated to give the requested number, else if the input has more channels than requested then the additional channels will be ignored. If desired_samples is set, then the audio will be cropped or padded with zeroes to the requested length. The first output contains a Tensor with the content of the audio samples. The lowest dimension will be the number of channels, and the second will be the number of samples. For example, a ten-sample-long stereo WAV file should give an output shape of [10, 2]. Args contents A Tensor of type string. The WAV-encoded audio, usually from a file. desired_channels An optional int. Defaults to -1. Number of sample channels wanted. desired_samples An optional int. Defaults to -1. Length of audio requested. name A name for the operation (optional). Returns A tuple of Tensor objects (audio, sample_rate). audio A Tensor of type float32. sample_rate A Tensor of type int32.
tensorflow.raw_ops.decodewav
tf.raw_ops.DeepCopy Makes a copy of x. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.DeepCopy tf.raw_ops.DeepCopy( x, name=None ) Args x A Tensor. The source tensor of type T. name A name for the operation (optional). Returns A Tensor. Has the same type as x.
tensorflow.raw_ops.deepcopy
tf.raw_ops.DeleteIterator A container for an iterator resource. View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.DeleteIterator tf.raw_ops.DeleteIterator( handle, deleter, name=None ) Args handle A Tensor of type resource. A handle to the iterator to delete. deleter A Tensor of type variant. A variant deleter. name A name for the operation (optional). Returns The created Operation.
tensorflow.raw_ops.deleteiterator
tf.raw_ops.DeleteMemoryCache View aliases Compat aliases for migration See Migration guide for more details. tf.compat.v1.raw_ops.DeleteMemoryCache tf.raw_ops.DeleteMemoryCache( handle, deleter, name=None ) Args handle A Tensor of type resource. deleter A Tensor of type variant. name A name for the operation (optional). Returns The created Operation.
tensorflow.raw_ops.deletememorycache