tf.raw_ops.Gather Gather slices from params according to indices.  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.Gather
tf.raw_ops.Gather(
    params, indices, validate_indices=True, name=None
)
 indices must be an integer tensor of any dimension (usually 0-D or 1-D). Produces an output tensor with shape indices.shape + params.shape[1:] where: # Scalar indices
output[:, ..., :] = params[indices, :, ... :]

# Vector indices
output[i, :, ..., :] = params[indices[i], :, ... :]

# Higher rank indices
output[i, ..., j, :, ... :] = params[indices[i, ..., j], :, ..., :]
 If indices is a permutation and len(indices) == params.shape[0] then this operation will permute params accordingly. validate_indices: DEPRECATED. If this operation is assigned to CPU, values in indices are always validated to be within range. If assigned to GPU, out-of-bound indices result in safe but unspecified behavior, which may include raising an error.

 Args
  params   A Tensor.
  indices   A Tensor. Must be one of the following types: int32, int64.
  validate_indices   An optional bool. Defaults to True.
  name   A name for the operation (optional).

 Returns   A Tensor. Has the same type as params.


tf.raw_ops.GatherNd   Gather slices from params into a Tensor with shape specified by indices.  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.GatherNd
tf.raw_ops.GatherNd(
    params, indices, name=None
)
 indices is a K-dimensional integer tensor, best thought of as a (K-1)-dimensional tensor of indices into params, where each element defines a slice of params: output[\\(i_0, ..., i_{K-2}\\)] = params[indices[\\(i_0, ..., i_{K-2}\\)]]
 Whereas in tf.gather indices defines slices into the axis dimension of params, in tf.gather_nd, indices defines slices into the first N dimensions of params, where N = indices.shape[-1]. The last dimension of indices can be at most the rank of params: indices.shape[-1] <= params.rank
 The last dimension of indices corresponds to elements (if indices.shape[-1] == params.rank) or slices (if indices.shape[-1] < params.rank) along dimension indices.shape[-1] of params. The output tensor has shape indices.shape[:-1] + params.shape[indices.shape[-1]:]
 Note that on CPU, if an out of bound index is found, an error is returned. On GPU, if an out of bound index is found, a 0 is stored in the corresponding output value. Some examples below. Simple indexing into a matrix: indices = [[0, 0], [1, 1]]
params = [['a', 'b'], ['c', 'd']]
output = ['a', 'd']
 Slice indexing into a matrix: indices = [[1], [0]]
params = [['a', 'b'], ['c', 'd']]
output = [['c', 'd'], ['a', 'b']]
 Indexing into a 3-tensor: indices = [[1]]
params = [[['a0', 'b0'], ['c0', 'd0']],
          [['a1', 'b1'], ['c1', 'd1']]]
output = [[['a1', 'b1'], ['c1', 'd1']]]

indices = [[0, 1], [1, 0]]
params = [[['a0', 'b0'], ['c0', 'd0']],
          [['a1', 'b1'], ['c1', 'd1']]]
output = [['c0', 'd0'], ['a1', 'b1']]

indices = [[0, 0, 1], [1, 0, 1]]
params = [[['a0', 'b0'], ['c0', 'd0']],
          [['a1', 'b1'], ['c1', 'd1']]]
output = ['b0', 'b1']
 Batched indexing into a matrix: indices = [[[0, 0]], [[0, 1]]]
params = [['a', 'b'], ['c', 'd']]
output = [['a'], ['b']]
 Batched slice indexing into a matrix: indices = [[[1]], [[0]]]
params = [['a', 'b'], ['c', 'd']]
output = [[['c', 'd']], [['a', 'b']]]
 Batched indexing into a 3-tensor: indices = [[[1]], [[0]]]
params = [[['a0', 'b0'], ['c0', 'd0']],
          [['a1', 'b1'], ['c1', 'd1']]]
output = [[[['a1', 'b1'], ['c1', 'd1']]],
          [[['a0', 'b0'], ['c0', 'd0']]]]

indices = [[[0, 1], [1, 0]], [[0, 0], [1, 1]]]
params = [[['a0', 'b0'], ['c0', 'd0']],
          [['a1', 'b1'], ['c1', 'd1']]]
output = [[['c0', 'd0'], ['a1', 'b1']],
          [['a0', 'b0'], ['c1', 'd1']]]

indices = [[[0, 0, 1], [1, 0, 1]], [[0, 1, 1], [1, 1, 0]]]
params = [[['a0', 'b0'], ['c0', 'd0']],
          [['a1', 'b1'], ['c1', 'd1']]]
output = [['b0', 'b1'], ['d0', 'c1']]
 See also tf.gather and tf.batch_gather.

 Args
  params   A Tensor. The tensor from which to gather values.
  indices   A Tensor. Must be one of the following types: int32, int64. Index tensor.
  name   A name for the operation (optional).

 Returns   A Tensor. Has the same type as params.


tf.raw_ops.GatherV2 Gather slices from params axis axis according to indices.  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.GatherV2
tf.raw_ops.GatherV2(
    params, indices, axis, batch_dims=0, name=None
)
 indices must be an integer tensor of any dimension (usually 0-D or 1-D). Produces an output tensor with shape params.shape[:axis] + indices.shape[batch_dims:] + params.shape[axis + 1:] where: # Scalar indices (output is rank(params) - 1).
output[a_0, ..., a_n, b_0, ..., b_n] =
  params[a_0, ..., a_n, indices, b_0, ..., b_n]

# Vector indices (output is rank(params)).
output[a_0, ..., a_n, i, b_0, ..., b_n] =
  params[a_0, ..., a_n, indices[i], b_0, ..., b_n]

# Higher rank indices (output is rank(params) + rank(indices) - 1).
output[a_0, ..., a_n, i, ..., j, b_0, ... b_n] =
  params[a_0, ..., a_n, indices[i, ..., j], b_0, ..., b_n]
    Note that on CPU, if an out of bound index is found, an error is returned. On GPU, if an out of bound index is found, a 0 is stored in the corresponding output value. See also tf.batch_gather and tf.gather_nd.

 Args
  params   A Tensor. The tensor from which to gather values. Must be at least rank axis + 1.
  indices   A Tensor. Must be one of the following types: int32, int64. Index tensor. Must be in range [0, params.shape[axis]).
  axis   A Tensor. Must be one of the following types: int32, int64. The axis in params to gather indices from. Defaults to the first dimension. Supports negative indexes.
  batch_dims   An optional int. Defaults to 0.
  name   A name for the operation (optional).

 Returns   A Tensor. Has the same type as params.


tf.raw_ops.GenerateBoundingBoxProposals This op produces Region of Interests from given bounding boxes(bbox_deltas) encoded wrt anchors according to eq.2 in arXiv:1506.01497  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.GenerateBoundingBoxProposals
tf.raw_ops.GenerateBoundingBoxProposals(
    scores, bbox_deltas, image_info, anchors, nms_threshold, pre_nms_topn, min_size,
    post_nms_topn=300, name=None
)
 The op selects top `pre_nms_topn` scoring boxes, decodes them with respect to anchors,
applies non-maximal suppression on overlapping boxes with higher than
`nms_threshold` intersection-over-union (iou) value, discarding boxes where shorter
side is less than `min_size`.
Inputs:
`scores`: A 4D tensor of shape [Batch, Height, Width, Num Anchors] containing the scores per anchor at given position
`bbox_deltas`: is a tensor of shape [Batch, Height, Width, 4 x Num Anchors] boxes encoded to each anchor
`anchors`: A 1D tensor of shape [4 x Num Anchors], representing the anchors.
Outputs:
`rois`: output RoIs, a 3D tensor of shape [Batch, post_nms_topn, 4], padded by 0 if less than post_nms_topn candidates found.
`roi_probabilities`: probability scores of each roi in 'rois', a 2D tensor of shape [Batch,post_nms_topn], padded with 0 if needed, sorted by scores.

 Args
  scores   A Tensor of type float32. A 4-D float tensor of shape [num_images, height, width, num_achors] containing scores of the boxes for given anchors, can be unsorted.
  bbox_deltas   A Tensor of type float32. A 4-D float tensor of shape [num_images, height, width, 4 x num_anchors]. encoding boxes with respec to each anchor. Coordinates are given in the form [dy, dx, dh, dw].
  image_info   A Tensor of type float32. A 2-D float tensor of shape [num_images, 5] containing image information Height, Width, Scale.
  anchors   A Tensor of type float32. A 2-D float tensor of shape [num_anchors, 4] describing the anchor boxes. Boxes are formatted in the form [y1, x1, y2, x2].
  nms_threshold   A Tensor of type float32. A scalar float tensor for non-maximal-suppression threshold.
  pre_nms_topn   A Tensor of type int32. A scalar int tensor for the number of top scoring boxes to be used as input.
  min_size   A Tensor of type float32. A scalar float tensor. Any box that has a smaller size than min_size will be discarded.
  post_nms_topn   An optional int. Defaults to 300. An integer. Maximum number of rois in the output.
  name   A name for the operation (optional).

 Returns   A tuple of Tensor objects (rois, roi_probabilities).     rois   A Tensor of type float32.
  roi_probabilities   A Tensor of type float32.


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

 Args
  new_vocab_file   A Tensor of type string. Path to the new vocab file.
  old_vocab_file   A Tensor of type string. Path to the old vocab file.
  new_vocab_offset   An int that is >= 0. How many entries into the new vocab file to start reading.
  num_new_vocab   An int that is >= 0. Number of entries in the new vocab file to remap.
  old_vocab_size   An optional int that is >= -1. Defaults to -1. Number of entries in the old vocab file to consider. If -1, use the entire old vocabulary.
  name   A name for the operation (optional).

 Returns   A tuple of Tensor objects (remapping, num_present).     remapping   A Tensor of type int64.
  num_present   A Tensor of type int32.


tf.raw_ops.GeneratorDataset Creates a dataset that invokes a function to generate elements.  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.GeneratorDataset
tf.raw_ops.GeneratorDataset(
    init_func_other_args, next_func_other_args, finalize_func_other_args, init_func,
    next_func, finalize_func, output_types, output_shapes, name=None
)

 Args
  init_func_other_args   A list of Tensor objects.
  next_func_other_args   A list of Tensor objects.
  finalize_func_other_args   A list of Tensor objects.
  init_func   A function decorated with @Defun.
  next_func   A function decorated with @Defun.
  finalize_func   A function decorated with @Defun.
  output_types   A list of tf.DTypes that has length >= 1.
  output_shapes   A list of shapes (each a tf.TensorShape or list of ints) that has length >= 1.
  name   A name for the operation (optional).

 Returns   A Tensor of type variant.


tf.raw_ops.GetSessionHandle Store the input tensor in the state of the current session.  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.GetSessionHandle
tf.raw_ops.GetSessionHandle(
    value, name=None
)

 Args
  value   A Tensor. The tensor to be stored.
  name   A name for the operation (optional).

 Returns   A Tensor of type string.


tf.raw_ops.GetSessionHandleV2 Store the input tensor in the state of the current session.  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.GetSessionHandleV2
tf.raw_ops.GetSessionHandleV2(
    value, name=None
)

 Args
  value   A Tensor. The tensor to be stored.
  name   A name for the operation (optional).

 Returns   A Tensor of type resource.


tf.raw_ops.GetSessionTensor Get the value of the tensor specified by its handle.  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.GetSessionTensor
tf.raw_ops.GetSessionTensor(
    handle, dtype, name=None
)

 Args
  handle   A Tensor of type string. The handle for a tensor stored in the session state.
  dtype   A tf.DType. The type of the output value.
  name   A name for the operation (optional).

 Returns   A Tensor of type dtype.


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

Note: math.greater supports broadcasting. More about broadcasting here
 Example: x = tf.constant([5, 4, 6])
y = tf.constant([5, 2, 5])
tf.math.greater(x, y) ==> [False, True, True]

x = tf.constant([5, 4, 6])
y = tf.constant([5])
tf.math.greater(x, y) ==> [False, False, True]

 Args
  x   A Tensor. Must be one of the following types: float32, float64, int32, uint8, int16, int8, int64, bfloat16, uint16, half, uint32, uint64.
  y   A Tensor. Must have the same type as x.
  name   A name for the operation (optional).

 Returns   A Tensor of type bool.


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

Note: math.greater_equal supports broadcasting. More about broadcasting here
 Example: x = tf.constant([5, 4, 6, 7])
y = tf.constant([5, 2, 5, 10])
tf.math.greater_equal(x, y) ==> [True, True, True, False]

x = tf.constant([5, 4, 6, 7])
y = tf.constant([5])
tf.math.greater_equal(x, y) ==> [True, False, True, True]

 Args
  x   A Tensor. Must be one of the following types: float32, float64, int32, uint8, int16, int8, int64, bfloat16, uint16, half, uint32, uint64.
  y   A Tensor. Must have the same type as x.
  name   A name for the operation (optional).

 Returns   A Tensor of type bool.


tf.raw_ops.GroupByReducerDataset Creates a dataset that computes a group-by on input_dataset.  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.GroupByReducerDataset
tf.raw_ops.GroupByReducerDataset(
    input_dataset, key_func_other_arguments, init_func_other_arguments,
    reduce_func_other_arguments, finalize_func_other_arguments, key_func, init_func,
    reduce_func, finalize_func, output_types, output_shapes, name=None
)
 Creates a dataset that computes a group-by on input_dataset.

 Args
  input_dataset   A Tensor of type variant. A variant tensor representing the input dataset.
  key_func_other_arguments   A list of Tensor objects. A list of tensors, typically values that were captured when building a closure for key_func.
  init_func_other_arguments   A list of Tensor objects. A list of tensors, typically values that were captured when building a closure for init_func.
  reduce_func_other_arguments   A list of Tensor objects. A list of tensors, typically values that were captured when building a closure for reduce_func.
  finalize_func_other_arguments   A list of Tensor objects. A list of tensors, typically values that were captured when building a closure for finalize_func.
  key_func   A function decorated with @Defun. A function mapping an element of input_dataset, concatenated with key_func_other_arguments to a scalar value of type DT_INT64.
  init_func   A function decorated with @Defun. A function mapping a key of type DT_INT64, concatenated with init_func_other_arguments to the initial reducer state.
  reduce_func   A function decorated with @Defun. A function mapping the current reducer state and an element of input_dataset, concatenated with reduce_func_other_arguments to a new reducer state.
  finalize_func   A function decorated with @Defun. A function mapping the final reducer state to an output element.
  output_types   A list of tf.DTypes that has length >= 1.
  output_shapes   A list of shapes (each a tf.TensorShape or list of ints) that has length >= 1.
  name   A name for the operation (optional).

 Returns   A Tensor of type variant.


tf.raw_ops.GroupByWindowDataset Creates a dataset that computes a windowed group-by on input_dataset.  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.GroupByWindowDataset
tf.raw_ops.GroupByWindowDataset(
    input_dataset, key_func_other_arguments, reduce_func_other_arguments,
    window_size_func_other_arguments, key_func, reduce_func, window_size_func,
    output_types, output_shapes, name=None
)
 //

 Args
  input_dataset   A Tensor of type variant.
  key_func_other_arguments   A list of Tensor objects.
  reduce_func_other_arguments   A list of Tensor objects.
  window_size_func_other_arguments   A list of Tensor objects.
  key_func   A function decorated with @Defun. A function mapping an element of input_dataset, concatenated with key_func_other_arguments to a scalar value of type DT_INT64.
  reduce_func   A function decorated with @Defun.
  window_size_func   A function decorated with @Defun.
  output_types   A list of tf.DTypes that has length >= 1.
  output_shapes   A list of shapes (each a tf.TensorShape or list of ints) that has length >= 1.
  name   A name for the operation (optional).

 Returns   A Tensor of type variant.


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

[r_bar u_bar] = x_h_prev * w_ru + b_ru

r = sigmoid(r_bar)
u = sigmoid(u_bar)

h_prevr = h_prev \circ r

x_h_prevr = [x h_prevr]

c_bar = x_h_prevr * w_c + b_c
c = tanh(c_bar)

h = (1-u) \circ c + u \circ h_prev

 Args
  x   A Tensor. Must be one of the following types: float32.
  h_prev   A Tensor. Must have the same type as x.
  w_ru   A Tensor. Must have the same type as x.
  w_c   A Tensor. Must have the same type as x.
  b_ru   A Tensor. Must have the same type as x.
  b_c   A Tensor. Must have the same type as x.
  name   A name for the operation (optional).

 Returns   A tuple of Tensor objects (r, u, c, h).     r   A Tensor. Has the same type as x.
  u   A Tensor. Has the same type as x.
  c   A Tensor. Has the same type as x.
  h   A Tensor. Has the same type as x.


tf.raw_ops.GRUBlockCellGrad Computes the GRU cell back-propagation for 1 time step.  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.GRUBlockCellGrad
tf.raw_ops.GRUBlockCellGrad(
    x, h_prev, w_ru, w_c, b_ru, b_c, r, u, c, d_h, name=None
)
 Args x: Input to the GRU cell. h_prev: State input from the previous GRU cell. w_ru: Weight matrix for the reset and update gate. w_c: Weight matrix for the cell connection gate. b_ru: Bias vector for the reset and update gate. b_c: Bias vector for the cell connection gate. r: Output of the reset gate. u: Output of the update gate. c: Output of the cell connection gate. d_h: Gradients of the h_new wrt to objective function. Returns d_x: Gradients of the x wrt to objective function. d_h_prev: Gradients of the h wrt to objective function. d_c_bar Gradients of the c_bar wrt to objective function. d_r_bar_u_bar Gradients of the r_bar & u_bar wrt to objective function. This kernel op implements the following mathematical equations: Note on notation of the variables: Concatenation of a and b is represented by a_b Element-wise dot product of a and b is represented by ab Element-wise dot product is represented by \circ Matrix multiplication is represented by * Additional notes for clarity: w_ru can be segmented into 4 different matrices. w_ru = [w_r_x w_u_x
        w_r_h_prev w_u_h_prev]
 Similarly, w_c can be segmented into 2 different matrices. w_c = [w_c_x w_c_h_prevr]
 Same goes for biases. b_ru = [b_ru_x b_ru_h]
b_c = [b_c_x b_c_h]
 Another note on notation: d_x = d_x_component_1 + d_x_component_2

where d_x_component_1 = d_r_bar * w_r_x^T + d_u_bar * w_r_x^T
and d_x_component_2 = d_c_bar * w_c_x^T

d_h_prev = d_h_prev_component_1 + d_h_prevr \circ r + d_h \circ u
where d_h_prev_componenet_1 = d_r_bar * w_r_h_prev^T + d_u_bar * w_r_h_prev^T
 Mathematics behind the Gradients below: d_c_bar = d_h \circ (1-u) \circ (1-c \circ c)
d_u_bar = d_h \circ (h-c) \circ u \circ (1-u)

d_r_bar_u_bar = [d_r_bar d_u_bar]

[d_x_component_1 d_h_prev_component_1] = d_r_bar_u_bar * w_ru^T

[d_x_component_2 d_h_prevr] = d_c_bar * w_c^T

d_x = d_x_component_1 + d_x_component_2

d_h_prev = d_h_prev_component_1 + d_h_prevr \circ r + u
 Below calculation is performed in the python wrapper for the Gradients (not in the gradient kernel.) d_w_ru = x_h_prevr^T * d_c_bar

d_w_c = x_h_prev^T * d_r_bar_u_bar

d_b_ru = sum of d_r_bar_u_bar along axis = 0

d_b_c = sum of d_c_bar along axis = 0

 Args
  x   A Tensor. Must be one of the following types: float32.
  h_prev   A Tensor. Must have the same type as x.
  w_ru   A Tensor. Must have the same type as x.
  w_c   A Tensor. Must have the same type as x.
  b_ru   A Tensor. Must have the same type as x.
  b_c   A Tensor. Must have the same type as x.
  r   A Tensor. Must have the same type as x.
  u   A Tensor. Must have the same type as x.
  c   A Tensor. Must have the same type as x.
  d_h   A Tensor. Must have the same type as x.
  name   A name for the operation (optional).

 Returns   A tuple of Tensor objects (d_x, d_h_prev, d_c_bar, d_r_bar_u_bar).     d_x   A Tensor. Has the same type as x.
  d_h_prev   A Tensor. Has the same type as x.
  d_c_bar   A Tensor. Has the same type as x.
  d_r_bar_u_bar   A Tensor. Has the same type as x.


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

 Args
  input   A Tensor.
  name   A name for the operation (optional).

 Returns   A Tensor. Has the same type as input.


tf.raw_ops.HashTable Creates a non-initialized hash table.  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.HashTable
tf.raw_ops.HashTable(
    key_dtype, value_dtype, container='', shared_name='',
    use_node_name_sharing=False, name=None
)
 This op creates a hash table, specifying the type of its keys and values. Before using the table you will have to initialize it. After initialization the table will be immutable.

 Args
  key_dtype   A tf.DType. Type of the table keys.
  value_dtype   A tf.DType. Type of the table values.
  container   An optional string. Defaults to "". If non-empty, this table is placed in the given container. Otherwise, a default container is used.
  shared_name   An optional string. Defaults to "". If non-empty, this table is shared under the given name across multiple sessions.
  use_node_name_sharing   An optional bool. Defaults to False. If true and shared_name is empty, the table is shared using the node name.
  name   A name for the operation (optional).

 Returns   A Tensor of type mutable string.


tf.raw_ops.HashTableV2 Creates a non-initialized hash table.  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.HashTableV2
tf.raw_ops.HashTableV2(
    key_dtype, value_dtype, container='', shared_name='',
    use_node_name_sharing=False, name=None
)
 This op creates a hash table, specifying the type of its keys and values. Before using the table you will have to initialize it. After initialization the table will be immutable.

 Args
  key_dtype   A tf.DType. Type of the table keys.
  value_dtype   A tf.DType. Type of the table values.
  container   An optional string. Defaults to "". If non-empty, this table is placed in the given container. Otherwise, a default container is used.
  shared_name   An optional string. Defaults to "". If non-empty, this table is shared under the given name across multiple sessions.
  use_node_name_sharing   An optional bool. Defaults to False. If true and shared_name is empty, the table is shared using the node name.
  name   A name for the operation (optional).

 Returns   A Tensor of type resource.


tf.raw_ops.HistogramFixedWidth Return histogram of values.  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.HistogramFixedWidth
tf.raw_ops.HistogramFixedWidth(
    values, value_range, nbins, dtype=tf.dtypes.int32, name=None
)
 Given the tensor values, this operation returns a rank 1 histogram counting the number of entries in values that fall into every bin. The bins are equal width and determined by the arguments value_range and nbins. # Bins will be:  (-inf, 1), [1, 2), [2, 3), [3, 4), [4, inf)
nbins = 5
value_range = [0.0, 5.0]
new_values = [-1.0, 0.0, 1.5, 2.0, 5.0, 15]

with tf.get_default_session() as sess:
  hist = tf.histogram_fixed_width(new_values, value_range, nbins=5)
  variables.global_variables_initializer().run()
  sess.run(hist) => [2, 1, 1, 0, 2]

 Args
  values   A Tensor. Must be one of the following types: int32, int64, float32, float64. Numeric Tensor.
  value_range   A Tensor. Must have the same type as values. Shape [2] Tensor of same dtype as values. values <= value_range[0] will be mapped to hist[0], values >= value_range[1] will be mapped to hist[-1].
  nbins   A Tensor of type int32. Scalar int32 Tensor. Number of histogram bins.
  dtype   An optional tf.DType from: tf.int32, tf.int64. Defaults to tf.int32.
  name   A name for the operation (optional).

 Returns   A Tensor of type dtype.


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

 Args
  tag   A Tensor of type string. Scalar. Tag to use for the Summary.Value.
  values   A Tensor. Must be one of the following types: float32, float64, int32, uint8, int16, int8, int64, bfloat16, uint16, half, uint32, uint64. Any shape. Values to use to build the histogram.
  name   A name for the operation (optional).

 Returns   A Tensor of type string.


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

 Args
  images   A Tensor. Must be one of the following types: half, bfloat16, float32, float64. 1-D or higher rank. HSV data to convert. Last dimension must be size 3.
  name   A name for the operation (optional).

 Returns   A Tensor. Has the same type as images.


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

 Args
  input   A Tensor.
  name   A name for the operation (optional).

 Returns   A Tensor. Has the same type as input.


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

@tf.RegisterGradient('OverrideGradientWithG')
def ApplyG(op, dy, _):
  return [None, g(dy)]  # Do not backprop to f(x).

 Args
  input   A list of Tensor objects.
  name   A name for the operation (optional).

 Returns   A list of Tensor objects. Has the same type as input.


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

 Args
  container   An optional string. Defaults to "". If non-empty, this reader is placed in the given container. Otherwise, a default container is used.
  shared_name   An optional string. Defaults to "". If non-empty, this reader is named in the given bucket with this shared_name. Otherwise, the node name is used instead.
  name   A name for the operation (optional).

 Returns   A Tensor of type mutable string.


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

 Args
  container   An optional string. Defaults to "". If non-empty, this reader is placed in the given container. Otherwise, a default container is used.
  shared_name   An optional string. Defaults to "". If non-empty, this reader is named in the given bucket with this shared_name. Otherwise, the node name is used instead.
  name   A name for the operation (optional).

 Returns   A Tensor of type resource.


tf.raw_ops.If output = cond ? then_branch(input) : else_branch(input)  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.If
tf.raw_ops.If(
    cond, input, Tout, then_branch, else_branch, output_shapes=[], name=None
)

 Args
  cond   A Tensor. A Tensor. If the tensor is a scalar of non-boolean type, the scalar is converted to a boolean according to the following rule: if the scalar is a numerical value, non-zero means True and zero means False; if the scalar is a string, non-empty means True and empty means False. If the tensor is not a scalar, being empty means False and being non-empty means True.
  input   A list of Tensor objects. A list of input tensors.
  Tout   A list of tf.DTypes. A list of output types.
  then_branch   A function decorated with @Defun. A function that takes 'inputs' and returns a list of tensors, whose types are the same as what else_branch returns.
  else_branch   A function decorated with @Defun. A function that takes 'inputs' and returns a list of tensors, whose types are the same as what then_branch returns.
  output_shapes   An optional list of shapes (each a tf.TensorShape or list of ints). Defaults to [].
  name   A name for the operation (optional).

 Returns   A list of Tensor objects of type Tout.


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

 Args
  input   A Tensor. Must be one of the following types: complex64, complex128. A complex tensor.
  name   A name for the operation (optional).

 Returns   A Tensor. Has the same type as input.


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

 Args
  input   A Tensor. Must be one of the following types: complex64, complex128. A complex tensor.
  name   A name for the operation (optional).

 Returns   A Tensor. Has the same type as input.


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

 Args
  input   A Tensor. Must be one of the following types: complex64, complex128. A complex tensor.
  name   A name for the operation (optional).

 Returns   A Tensor. Has the same type as input.


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

 Args
  a   A Tensor. Must be one of the following types: float32, float64.
  x   A Tensor. Must have the same type as a.
  name   A name for the operation (optional).

 Returns   A Tensor. Has the same type as a.


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

 Args
  a   A Tensor. Must be one of the following types: float32, float64.
  x   A Tensor. Must have the same type as a.
  name   A name for the operation (optional).

 Returns   A Tensor. Has the same type as a.


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

 Args
  a   A Tensor. Must be one of the following types: float32, float64.
  x   A Tensor. Must have the same type as a.
  name   A name for the operation (optional).

 Returns   A Tensor. Has the same type as a.


tf.raw_ops.IgnoreErrorsDataset Creates a dataset that contains the elements of input_dataset ignoring errors.  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.IgnoreErrorsDataset
tf.raw_ops.IgnoreErrorsDataset(
    input_dataset, output_types, output_shapes, log_warning=False, name=None
)

 Args
  input_dataset   A Tensor of type variant.
  output_types   A list of tf.DTypes that has length >= 1.
  output_shapes   A list of shapes (each a tf.TensorShape or list of ints) that has length >= 1.
  log_warning   An optional bool. Defaults to False.
  name   A name for the operation (optional).

 Returns   A Tensor of type variant.


tf.raw_ops.Imag   Returns the imaginary part of a complex number.  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.Imag
tf.raw_ops.Imag(
    input, Tout=tf.dtypes.float32, name=None
)
 Given a tensor input of complex numbers, this operation returns a tensor of type float that is the imaginary part of each element in input. All elements in input must be complex numbers of the form \(a + bj\), where a is the real part and b is the imaginary part returned by this operation. For example: # tensor 'input' is [-2.25 + 4.75j, 3.25 + 5.75j]
tf.imag(input) ==> [4.75, 5.75]

 Args
  input   A Tensor. Must be one of the following types: complex64, complex128.
  Tout   An optional tf.DType from: tf.float32, tf.float64. Defaults to tf.float32.
  name   A name for the operation (optional).

 Returns   A Tensor of type Tout.


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

 Args
  images   A Tensor. Must be one of the following types: uint8, int32, int64, half, float32, float64. 4-D with shape [batch, height, width, channels].
  transforms   A Tensor of type float32. 2-D Tensor, [batch, 8] or [1, 8] matrix, where each row corresponds to a 3 x 3 projective transformation matrix, with the last entry assumed to be 1. If there is one row, the same transformation will be applied to all images.
  output_shape   A Tensor of type int32. 1-D Tensor [new_height, new_width].
  interpolation   A string. Interpolation method, "NEAREST" or "BILINEAR".
  fill_mode   An optional string. Defaults to "CONSTANT". Fill mode, "REFLECT", "WRAP", or "CONSTANT".
  name   A name for the operation (optional).

 Returns   A Tensor. Has the same type as images.


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

 Args
  images   A Tensor. Must be one of the following types: uint8, int32, int64, half, float32, float64. 4-D with shape [batch, height, width, channels].
  transforms   A Tensor of type float32. 2-D Tensor, [batch, 8] or [1, 8] matrix, where each row corresponds to a 3 x 3 projective transformation matrix, with the last entry assumed to be 1. If there is one row, the same transformation will be applied to all images.
  output_shape   A Tensor of type int32. 1-D Tensor [new_height, new_width].
  fill_value   A Tensor of type float32. float, the value to be filled when fill_mode is constant".
  interpolation   A string. Interpolation method, "NEAREST" or "BILINEAR".
  fill_mode   An optional string. Defaults to "CONSTANT". Fill mode, "REFLECT", "WRAP", or "CONSTANT".
  name   A name for the operation (optional).

 Returns   A Tensor. Has the same type as images.


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

 Args
  tag   A Tensor of type string. Scalar. Used to build the tag attribute of the summary values.
  tensor   A Tensor. Must be one of the following types: uint8, float32, half, float64. 4-D of shape [batch_size, height, width, channels] where channels is 1, 3, or 4.
  max_images   An optional int that is >= 1. Defaults to 3. Max number of batch elements to generate images for.
  bad_color   An optional tf.TensorProto. Defaults to dtype: DT_UINT8 tensor_shape { dim { size: 4 } } int_val: 255 int_val: 0 int_val: 0 int_val: 255. Color to use for pixels with non-finite values.
  name   A name for the operation (optional).

 Returns   A Tensor of type string.


tf.raw_ops.ImmutableConst Returns immutable tensor from memory region.  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.ImmutableConst
tf.raw_ops.ImmutableConst(
    dtype, shape, memory_region_name, name=None
)
 The current implementation memmaps the tensor from a file.

 Args
  dtype   A tf.DType. Type of the returned tensor.
  shape   A tf.TensorShape or list of ints. Shape of the returned tensor.
  memory_region_name   A string. Name of readonly memory region used by the tensor, see NewReadOnlyMemoryRegionFromFile in tensorflow::Env.
  name   A name for the operation (optional).

 Returns   A Tensor of type dtype.


tf.raw_ops.ImportEvent  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.ImportEvent
tf.raw_ops.ImportEvent(
    writer, event, name=None
)

 Args
  writer   A Tensor of type resource.
  event   A Tensor of type string.
  name   A name for the operation (optional).

 Returns   The created Operation.


tf.raw_ops.InfeedDequeue A placeholder op for a value that will be fed into the computation.  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.InfeedDequeue
tf.raw_ops.InfeedDequeue(
    dtype, shape, name=None
)

 Args
  dtype   A tf.DType. The type of elements in the tensor.
  shape   A tf.TensorShape or list of ints. The shape of the tensor.
  name   A name for the operation (optional).

 Returns   A Tensor of type dtype.


tf.raw_ops.InfeedDequeueTuple Fetches multiple values from infeed as an XLA tuple.  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.InfeedDequeueTuple
tf.raw_ops.InfeedDequeueTuple(
    dtypes, shapes, name=None
)

 Args
  dtypes   A list of tf.DTypes that has length >= 1. The element types of each element in outputs.
  shapes   A list of shapes (each a tf.TensorShape or list of ints). The shapes of each tensor in outputs.
  name   A name for the operation (optional).

 Returns   A list of Tensor objects of type dtypes.


tf.raw_ops.InfeedEnqueue An op which feeds a single Tensor value into the computation.  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.InfeedEnqueue
tf.raw_ops.InfeedEnqueue(
    input, shape=[], layout=[], device_ordinal=-1, name=None
)

 Args
  input   A Tensor. A tensor that will be provided using the infeed mechanism.
  shape   An optional tf.TensorShape or list of ints. Defaults to []. The shape of the tensor.
  layout   An optional list of ints. Defaults to []. A vector holding the requested layout in minor-to-major sequence. If a layout attribute is passed, but its values are all -1, the layout will be computed by the infeed operation.
  device_ordinal   An optional int. Defaults to -1. The TPU device to use. This should be -1 when the Op is running on a TPU device, and >= 0 when the Op is running on the CPU device.
  name   A name for the operation (optional).

 Returns   The created Operation.


tf.raw_ops.InfeedEnqueuePrelinearizedBuffer An op which enqueues prelinearized buffer into TPU infeed.  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.InfeedEnqueuePrelinearizedBuffer
tf.raw_ops.InfeedEnqueuePrelinearizedBuffer(
    input, device_ordinal=-1, name=None
)

 Args
  input   A Tensor of type variant. A variant tensor representing linearized output.
  device_ordinal   An optional int. Defaults to -1. The TPU device to use. This should be -1 when the Op is running on a TPU device and = 0 when the Op is running on the CPU device.
  name   A name for the operation (optional).

 Returns   The created Operation.


tf.raw_ops.InfeedEnqueueTuple Feeds multiple Tensor values into the computation as an XLA tuple.  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.InfeedEnqueueTuple
tf.raw_ops.InfeedEnqueueTuple(
    inputs, shapes, layouts=[], device_ordinal=-1, name=None
)

 Args
  inputs   A list of Tensor objects. A list of tensors that will be provided using the infeed mechanism.
  shapes   A list of shapes (each a tf.TensorShape or list of ints). The shapes of each tensor in inputs.
  layouts   An optional list of ints. Defaults to []. A vector holding the requested layout in minor-to-major sequence for all the tuple shapes, in the order the shapes appear in the "shapes" input. The layout elements for a sub-shape can be set to -1, in which case the corresponding layout will be computed by the infeed operation.
  device_ordinal   An optional int. Defaults to -1. The TPU device to use. This should be -1 when the Op is running on a TPU device, and >= 0 when the Op is running on the CPU device.
  name   A name for the operation (optional).

 Returns   The created Operation.


tf.raw_ops.InitializeTable Table initializer that takes two tensors for keys and values respectively.  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.InitializeTable
tf.raw_ops.InitializeTable(
    table_handle, keys, values, name=None
)

 Args
  table_handle   A Tensor of type mutable string. Handle to a table which will be initialized.
  keys   A Tensor. Keys of type Tkey.
  values   A Tensor. Values of type Tval.
  name   A name for the operation (optional).

 Returns   The created Operation.


tf.raw_ops.InitializeTableFromDataset  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.InitializeTableFromDataset
tf.raw_ops.InitializeTableFromDataset(
    table_handle, dataset, name=None
)

 Args
  table_handle   A Tensor of type resource.
  dataset   A Tensor of type variant.
  name   A name for the operation (optional).

 Returns   The created Operation.


tf.raw_ops.InitializeTableFromTextFile Initializes a table from a text file.  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.InitializeTableFromTextFile
tf.raw_ops.InitializeTableFromTextFile(
    table_handle, filename, key_index, value_index, vocab_size=-1,
    delimiter='\t', name=None
)
 It inserts one key-value pair into the table for each line of the file. The key and value is extracted from the whole line content, elements from the split line based on delimiter or the line number (starting from zero). Where to extract the key and value from a line is specified by key_index and value_index.  A value of -1 means use the line number(starting from zero), expects int64. A value of -2 means use the whole line content, expects string. A value >= 0 means use the index (starting at zero) of the split line based on delimiter.

 Args
  table_handle   A Tensor of type mutable string. Handle to a table which will be initialized.
  filename   A Tensor of type string. Filename of a vocabulary text file.
  key_index   An int that is >= -2. Column index in a line to get the table key values from.
  value_index   An int that is >= -2. Column index that represents information of a line to get the table value values from.
  vocab_size   An optional int that is >= -1. Defaults to -1. Number of elements of the file, use -1 if unknown.
  delimiter   An optional string. Defaults to "\t". Delimiter to separate fields in a line.
  name   A name for the operation (optional).

 Returns   The created Operation.


tf.raw_ops.InitializeTableFromTextFileV2 Initializes a table from a text file.  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.InitializeTableFromTextFileV2
tf.raw_ops.InitializeTableFromTextFileV2(
    table_handle, filename, key_index, value_index, vocab_size=-1,
    delimiter='\t', name=None
)
 It inserts one key-value pair into the table for each line of the file. The key and value is extracted from the whole line content, elements from the split line based on delimiter or the line number (starting from zero). Where to extract the key and value from a line is specified by key_index and value_index.  A value of -1 means use the line number(starting from zero), expects int64. A value of -2 means use the whole line content, expects string. A value >= 0 means use the index (starting at zero) of the split line based on delimiter.

 Args
  table_handle   A Tensor of type resource. Handle to a table which will be initialized.
  filename   A Tensor of type string. Filename of a vocabulary text file.
  key_index   An int that is >= -2. Column index in a line to get the table key values from.
  value_index   An int that is >= -2. Column index that represents information of a line to get the table value values from.
  vocab_size   An optional int that is >= -1. Defaults to -1. Number of elements of the file, use -1 if unknown.
  delimiter   An optional string. Defaults to "\t". Delimiter to separate fields in a line.
  name   A name for the operation (optional).

 Returns   The created Operation.


tf.raw_ops.InitializeTableV2 Table initializer that takes two tensors for keys and values respectively.  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.InitializeTableV2
tf.raw_ops.InitializeTableV2(
    table_handle, keys, values, name=None
)

 Args
  table_handle   A Tensor of type resource. Handle to a table which will be initialized.
  keys   A Tensor. Keys of type Tkey.
  values   A Tensor. Values of type Tval.
  name   A name for the operation (optional).

 Returns   The created Operation.


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

 Args
  x   A Tensor. A Tensor of type T.
  i   A Tensor of type int32. A vector. Indices into the left-most dimension of x.
  v   A Tensor. Must have the same type as x. A Tensor of type T. Same dimension sizes as x except the first dimension, which must be the same as i's size.
  name   A name for the operation (optional).

 Returns   A Tensor. Has the same type as x.


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

 Args
  x   A Tensor. A Tensor of type T.
  i   A Tensor of type int32. A vector. Indices into the left-most dimension of x.
  v   A Tensor. Must have the same type as x. A Tensor of type T. Same dimension sizes as x except the first dimension, which must be the same as i's size.
  name   A name for the operation (optional).

 Returns   A Tensor. Has the same type as x.


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

 Args
  x   A Tensor. A tensor of type T.
  i   A Tensor of type int32. A vector. Indices into the left-most dimension of x.
  v   A Tensor. Must have the same type as x. A Tensor of type T. Same dimension sizes as x except the first dimension, which must be the same as i's size.
  name   A name for the operation (optional).

 Returns   A Tensor. Has the same type as x.


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

 Args
  input_dataset   A Tensor of type variant.
  other_arguments   A list of Tensor objects.
  cycle_length   A Tensor of type int64.
  block_length   A Tensor of type int64.
  f   A function decorated with @Defun. A function mapping elements of input_dataset, concatenated with other_arguments, to a Dataset variant that contains elements matching output_types and output_shapes.
  output_types   A list of tf.DTypes that has length >= 1.
  output_shapes   A list of shapes (each a tf.TensorShape or list of ints) that has length >= 1.
  name   A name for the operation (optional).

 Returns   A Tensor of type variant.


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

 Args
  predictions   A Tensor of type float32. A batch_size x classes tensor.
  targets   A Tensor. Must be one of the following types: int32, int64. A batch_size vector of class ids.
  k   An int. Number of top elements to look at for computing precision.
  name   A name for the operation (optional).

 Returns   A Tensor of type bool.


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

 Args
  predictions   A Tensor of type float32. A batch_size x classes tensor.
  targets   A Tensor. Must be one of the following types: int32, int64. A batch_size vector of class ids.
  k   A Tensor. Must have the same type as targets. Number of top elements to look at for computing precision.
  name   A name for the operation (optional).

 Returns   A Tensor of type bool.


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

 Args
  x   A Tensor. Must be one of the following types: bfloat16, half, float32, float64, int8, int16, int32, int64, complex64, complex128.
  name   A name for the operation (optional).

 Returns   A Tensor. Has the same type as x.


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

# flip 2 (00000010) to -3 (11111101)
tf.assert_equal(-3, bitwise_ops.invert(2))

dtype_list = [dtypes.int8, dtypes.int16, dtypes.int32, dtypes.int64,
              dtypes.uint8, dtypes.uint16, dtypes.uint32, dtypes.uint64]

inputs = [0, 5, 3, 14]
for dtype in dtype_list:
  # Because of issues with negative numbers, let's test this indirectly.
  # 1. invert(a) and a = 0
  # 2. invert(a) or a = invert(0)
  input_tensor = tf.constant([0, 5, 3, 14], dtype=dtype)
  not_a_and_a, not_a_or_a, not_0 = [bitwise_ops.bitwise_and(
                                      input_tensor, bitwise_ops.invert(input_tensor)),
                                    bitwise_ops.bitwise_or(
                                      input_tensor, bitwise_ops.invert(input_tensor)),
                                    bitwise_ops.invert(
                                      tf.constant(0, dtype=dtype))]

  expected = tf.constant([0, 0, 0, 0], dtype=tf.float32)
  tf.assert_equal(tf.cast(not_a_and_a, tf.float32), expected)

  expected = tf.cast([not_0] * 4, tf.float32)
  tf.assert_equal(tf.cast(not_a_or_a, tf.float32), expected)

  # For unsigned dtypes let's also check the result directly.
  if dtype.is_unsigned:
    inverted = bitwise_ops.invert(input_tensor)
    expected = tf.constant([dtype.max - x for x in inputs], dtype=tf.float32)
    tf.assert_equal(tf.cast(inverted, tf.float32), tf.cast(expected, tf.float32))

 Args
  x   A Tensor. Must be one of the following types: int8, int16, int32, int64, uint8, uint16, uint32, uint64.
  name   A name for the operation (optional).

 Returns   A Tensor. Has the same type as x.


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

 Args
  x   A Tensor. Must be one of the following types: int32, int64. 1-D.
  name   A name for the operation (optional).

 Returns   A Tensor. Has the same type as x.


tf.raw_ops.InvGrad Computes the gradient for the inverse of x wrt its input.  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.InvGrad
tf.raw_ops.InvGrad(
    y, dy, name=None
)
 Specifically, grad = -dy * y*y, where y = 1/x, and dy is the corresponding input gradient.

 Args
  y   A Tensor. Must be one of the following types: bfloat16, half, float32, float64, complex64, complex128.
  dy   A Tensor. Must have the same type as y.
  name   A name for the operation (optional).

 Returns   A Tensor. Has the same type as y.


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

 Args
  input   A Tensor. Must be one of the following types: complex64, complex128. A complex tensor.
  fft_length   A Tensor of type int32. An int32 tensor of shape [1]. The FFT length.
  Treal   An optional tf.DType from: tf.float32, tf.float64. Defaults to tf.float32.
  name   A name for the operation (optional).

 Returns   A Tensor of type Treal.


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

 Args
  input   A Tensor. Must be one of the following types: complex64, complex128. A complex tensor.
  fft_length   A Tensor of type int32. An int32 tensor of shape [2]. The FFT length for each dimension.
  Treal   An optional tf.DType from: tf.float32, tf.float64. Defaults to tf.float32.
  name   A name for the operation (optional).

 Returns   A Tensor of type Treal.


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

 Args
  input   A Tensor. Must be one of the following types: complex64, complex128. A complex tensor.
  fft_length   A Tensor of type int32. An int32 tensor of shape [3]. The FFT length for each dimension.
  Treal   An optional tf.DType from: tf.float32, tf.float64. Defaults to tf.float32.
  name   A name for the operation (optional).

 Returns   A Tensor of type Treal.


tf.raw_ops.IsBoostedTreesEnsembleInitialized Checks whether a tree ensemble has been initialized.  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.IsBoostedTreesEnsembleInitialized
tf.raw_ops.IsBoostedTreesEnsembleInitialized(
    tree_ensemble_handle, name=None
)

 Args
  tree_ensemble_handle   A Tensor of type resource. Handle to the tree ensemble resource.
  name   A name for the operation (optional).

 Returns   A Tensor of type bool.


tf.raw_ops.IsBoostedTreesQuantileStreamResourceInitialized Checks whether a quantile stream has been initialized.  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.IsBoostedTreesQuantileStreamResourceInitialized
tf.raw_ops.IsBoostedTreesQuantileStreamResourceInitialized(
    quantile_stream_resource_handle, name=None
)
 An Op that checks if quantile stream resource is initialized.

 Args
  quantile_stream_resource_handle   A Tensor of type resource. resource; The reference to quantile stream resource handle.
  name   A name for the operation (optional).

 Returns   A Tensor of type bool.


tf.raw_ops.IsFinite Returns which elements of x are finite.  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.IsFinite
tf.raw_ops.IsFinite(
    x, name=None
)
 Example: x = tf.constant([5.0, 4.8, 6.8, np.inf, np.nan])
tf.math.is_finite(x) ==> [True, True, True, False, False]

 Args
  x   A Tensor. Must be one of the following types: bfloat16, half, float32, float64.
  name   A name for the operation (optional).

 Returns   A Tensor of type bool.
 Numpy Compatibility Equivalent to np.isfinite


tf.raw_ops.IsInf Returns which elements of x are Inf.  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.IsInf
tf.raw_ops.IsInf(
    x, name=None
)
 Example: x = tf.constant([5.0, np.inf, 6.8, np.inf])
tf.math.is_inf(x) ==> [False, True, False, True]

 Args
  x   A Tensor. Must be one of the following types: bfloat16, half, float32, float64.
  name   A name for the operation (optional).

 Returns   A Tensor of type bool.
 Numpy Compatibility Equivalent to np.isinf


tf.raw_ops.IsNan Returns which elements of x are NaN.  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.IsNan
tf.raw_ops.IsNan(
    x, name=None
)
 Example: x = tf.constant([5.0, np.nan, 6.8, np.nan, np.inf])
tf.math.is_nan(x) ==> [False, True, False, True, False]

 Args
  x   A Tensor. Must be one of the following types: bfloat16, half, float32, float64.
  name   A name for the operation (optional).

 Returns   A Tensor of type bool.
 Numpy Compatibility Equivalent to np.isnan


tf.raw_ops.IsotonicRegression Solves a batch of isotonic regression problems.  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.IsotonicRegression
tf.raw_ops.IsotonicRegression(
    input, output_dtype=tf.dtypes.float32, name=None
)

 Args
  input   A Tensor. Must be one of the following types: float32, float64, int32, uint8, int16, int8, int64, bfloat16, uint16, half, uint32, uint64. A (batch_size, dim)-tensor holding a batch of inputs.
  output_dtype   An optional tf.DType from: tf.half, tf.bfloat16, tf.float32, tf.float64. Defaults to tf.float32. Dtype of output.
  name   A name for the operation (optional).

 Returns   A tuple of Tensor objects (output, segments).     output   A Tensor of type output_dtype.
  segments   A Tensor of type int32.


tf.raw_ops.IsVariableInitialized Checks whether a tensor has been initialized.  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.IsVariableInitialized
tf.raw_ops.IsVariableInitialized(
    ref, name=None
)
 Outputs boolean scalar indicating whether the tensor has been initialized.

 Args
  ref   A mutable Tensor. Should be from a Variable node. May be uninitialized.
  name   A name for the operation (optional).

 Returns   A Tensor of type bool.


tf.raw_ops.Iterator A container for an iterator resource.  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.Iterator
tf.raw_ops.Iterator(
    shared_name, container, output_types, output_shapes, name=None
)

 Args
  shared_name   A string.
  container   A string.
  output_types   A list of tf.DTypes that has length >= 1.
  output_shapes   A list of shapes (each a tf.TensorShape or list of ints) that has length >= 1.
  name   A name for the operation (optional).

 Returns   A Tensor of type resource.


tf.raw_ops.IteratorFromStringHandle Converts the given string representing a handle to an iterator to a resource.  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.IteratorFromStringHandle
tf.raw_ops.IteratorFromStringHandle(
    string_handle, output_types=[], output_shapes=[], name=None
)

 Args
  string_handle   A Tensor of type string. A string representation of the given handle.
  output_types   An optional list of tf.DTypes. Defaults to []. If specified, defines the type of each tuple component in an element produced by the resulting iterator.
  output_shapes   An optional list of shapes (each a tf.TensorShape or list of ints). Defaults to []. If specified, defines the shape of each tuple component in an element produced by the resulting iterator.
  name   A name for the operation (optional).

 Returns   A Tensor of type resource.


tf.raw_ops.IteratorFromStringHandleV2  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.IteratorFromStringHandleV2
tf.raw_ops.IteratorFromStringHandleV2(
    string_handle, output_types=[], output_shapes=[], name=None
)

 Args
  string_handle   A Tensor of type string.
  output_types   An optional list of tf.DTypes. Defaults to [].
  output_shapes   An optional list of shapes (each a tf.TensorShape or list of ints). Defaults to [].
  name   A name for the operation (optional).

 Returns   A Tensor of type resource.


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

 Args
  resource   A Tensor of type resource.
  name   A name for the operation (optional).

 Returns   A Tensor of type string.


tf.raw_ops.IteratorGetNext Gets the next output from the given iterator .  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.IteratorGetNext
tf.raw_ops.IteratorGetNext(
    iterator, output_types, output_shapes, name=None
)

 Args
  iterator   A Tensor of type resource.
  output_types   A list of tf.DTypes that has length >= 1.
  output_shapes   A list of shapes (each a tf.TensorShape or list of ints) that has length >= 1.
  name   A name for the operation (optional).

 Returns   A list of Tensor objects of type output_types.


tf.raw_ops.IteratorGetNextAsOptional Gets the next output from the given iterator as an Optional variant.  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.IteratorGetNextAsOptional
tf.raw_ops.IteratorGetNextAsOptional(
    iterator, output_types, output_shapes, name=None
)

 Args
  iterator   A Tensor of type resource.
  output_types   A list of tf.DTypes that has length >= 1.
  output_shapes   A list of shapes (each a tf.TensorShape or list of ints) that has length >= 1.
  name   A name for the operation (optional).

 Returns   A Tensor of type variant.


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

 Args
  iterator   A Tensor of type resource.
  output_types   A list of tf.DTypes that has length >= 1.
  output_shapes   A list of shapes (each a tf.TensorShape or list of ints) that has length >= 1.
  name   A name for the operation (optional).

 Returns   A list of Tensor objects of type output_types.


tf.raw_ops.IteratorToStringHandle Converts the given resource_handle representing an iterator to a string.  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.IteratorToStringHandle
tf.raw_ops.IteratorToStringHandle(
    resource_handle, name=None
)

 Args
  resource_handle   A Tensor of type resource. A handle to an iterator resource.
  name   A name for the operation (optional).

 Returns   A Tensor of type string.


tf.raw_ops.IteratorV2  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.IteratorV2
tf.raw_ops.IteratorV2(
    shared_name, container, output_types, output_shapes, name=None
)

 Args
  shared_name   A string.
  container   A string.
  output_types   A list of tf.DTypes that has length >= 1.
  output_shapes   A list of shapes (each a tf.TensorShape or list of ints) that has length >= 1.
  name   A name for the operation (optional).

 Returns   A Tensor of type resource.


tf.raw_ops.L2Loss L2 Loss.  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.L2Loss
tf.raw_ops.L2Loss(
    t, name=None
)
 Computes half the L2 norm of a tensor without the sqrt: output = sum(t ** 2) / 2

 Args
  t   A Tensor. Must be one of the following types: half, bfloat16, float32, float64. Typically 2-D, but may have any dimensions.
  name   A name for the operation (optional).

 Returns   A Tensor. Has the same type as t.


tf.raw_ops.LatencyStatsDataset Records the latency of producing input_dataset elements in a StatsAggregator.  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.LatencyStatsDataset
tf.raw_ops.LatencyStatsDataset(
    input_dataset, tag, output_types, output_shapes, name=None
)

 Args
  input_dataset   A Tensor of type variant.
  tag   A Tensor of type string.
  output_types   A list of tf.DTypes that has length >= 1.
  output_shapes   A list of shapes (each a tf.TensorShape or list of ints) that has length >= 1.
  name   A name for the operation (optional).

 Returns   A Tensor of type variant.


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

 Args
  features   A Tensor. Must be one of the following types: half, bfloat16, float32, float64.
  alpha   An optional float. Defaults to 0.2.
  name   A name for the operation (optional).

 Returns   A Tensor. Has the same type as features.


tf.raw_ops.LeakyReluGrad Computes rectified linear gradients for a LeakyRelu operation.  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.LeakyReluGrad
tf.raw_ops.LeakyReluGrad(
    gradients, features, alpha=0.2, name=None
)

 Args
  gradients   A Tensor. Must be one of the following types: half, bfloat16, float32, float64. The backpropagated gradients to the corresponding LeakyRelu operation.
  features   A Tensor. Must have the same type as gradients. The features passed as input to the corresponding LeakyRelu operation, OR the outputs of that operation (both work equivalently).
  alpha   An optional float. Defaults to 0.2.
  name   A name for the operation (optional).

 Returns   A Tensor. Has the same type as gradients.


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

 Args
  true_classes   A Tensor of type int64. A batch_size * num_true matrix, in which each row contains the IDs of the num_true target_classes in the corresponding original label.
  num_true   An int that is >= 1. Number of true labels per context.
  num_sampled   An int that is >= 1. Number of candidates to randomly sample.
  unique   A bool. If unique is true, we sample with rejection, so that all sampled candidates in a batch are unique. This requires some approximation to estimate the post-rejection sampling probabilities.
  range_max   An int that is >= 1. The sampler will sample integers from the interval [0, range_max).
  seed   An optional int. Defaults to 0. If either seed or seed2 are set to be non-zero, the random number generator is seeded by the given seed. Otherwise, it is seeded by a random seed.
  seed2   An optional int. Defaults to 0. An second seed to avoid seed collision.
  name   A name for the operation (optional).

 Returns   A tuple of Tensor objects (sampled_candidates, true_expected_count, sampled_expected_count).     sampled_candidates   A Tensor of type int64.
  true_expected_count   A Tensor of type float32.
  sampled_expected_count   A Tensor of type float32.


tf.raw_ops.LeftShift Elementwise computes the bitwise left-shift of x and y.  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.LeftShift
tf.raw_ops.LeftShift(
    x, y, name=None
)
 If y is negative, or greater than or equal to the width of x in bits the result is implementation defined. Example: import tensorflow as tf
from tensorflow.python.ops import bitwise_ops
import numpy as np
dtype_list = [tf.int8, tf.int16, tf.int32, tf.int64]

for dtype in dtype_list:
  lhs = tf.constant([-1, -5, -3, -14], dtype=dtype)
  rhs = tf.constant([5, 0, 7, 11], dtype=dtype)

  left_shift_result = bitwise_ops.left_shift(lhs, rhs)

  print(left_shift_result)

# This will print:
# tf.Tensor([ -32   -5 -128    0], shape=(4,), dtype=int8)
# tf.Tensor([   -32     -5   -384 -28672], shape=(4,), dtype=int16)
# tf.Tensor([   -32     -5   -384 -28672], shape=(4,), dtype=int32)
# tf.Tensor([   -32     -5   -384 -28672], shape=(4,), dtype=int64)

lhs = np.array([-2, 64, 101, 32], dtype=np.int8)
rhs = np.array([-1, -5, -3, -14], dtype=np.int8)
bitwise_ops.left_shift(lhs, rhs)
# <tf.Tensor: shape=(4,), dtype=int8, numpy=array([ -2,  64, 101,  32], dtype=int8)>

 Args
  x   A Tensor. Must be one of the following types: int8, int16, int32, int64, uint8, uint16, uint32, uint64.
  y   A Tensor. Must have the same type as x.
  name   A name for the operation (optional).

 Returns   A Tensor. Has the same type as x.


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

 Args
  input_dataset   A Tensor of type variant.
  other_arguments   A list of Tensor objects.
  cycle_length   A Tensor of type int64.
  block_length   A Tensor of type int64.
  buffer_output_elements   A Tensor of type int64.
  prefetch_input_elements   A Tensor of type int64.
  f   A function decorated with @Defun. A function mapping elements of input_dataset, concatenated with other_arguments, to a Dataset variant that contains elements matching output_types and output_shapes.
  output_types   A list of tf.DTypes that has length >= 1.
  output_shapes   A list of shapes (each a tf.TensorShape or list of ints) that has length >= 1.
  deterministic   An optional string. Defaults to "default".
  name   A name for the operation (optional).

 Returns   A Tensor of type variant.


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

Note: math.less supports broadcasting. More about broadcasting here
 Example: x = tf.constant([5, 4, 6])
y = tf.constant([5])
tf.math.less(x, y) ==> [False, True, False]

x = tf.constant([5, 4, 6])
y = tf.constant([5, 6, 7])
tf.math.less(x, y) ==> [False, True, True]

 Args
  x   A Tensor. Must be one of the following types: float32, float64, int32, uint8, int16, int8, int64, bfloat16, uint16, half, uint32, uint64.
  y   A Tensor. Must have the same type as x.
  name   A name for the operation (optional).

 Returns   A Tensor of type bool.


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

Note: math.less_equal supports broadcasting. More about broadcasting here
 Example: x = tf.constant([5, 4, 6])
y = tf.constant([5])
tf.math.less_equal(x, y) ==> [True, True, False]

x = tf.constant([5, 4, 6])
y = tf.constant([5, 6, 6])
tf.math.less_equal(x, y) ==> [True, True, True]

 Args
  x   A Tensor. Must be one of the following types: float32, float64, int32, uint8, int16, int8, int64, bfloat16, uint16, half, uint32, uint64.
  y   A Tensor. Must have the same type as x.
  name   A name for the operation (optional).

 Returns   A Tensor of type bool.


tf.raw_ops.Lgamma Computes the log of the absolute value of Gamma(x) element-wise.  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.Lgamma
tf.raw_ops.Lgamma(
    x, name=None
)
 For positive numbers, this function computes log((input - 1)!) for every element in the tensor. lgamma(5) = log((5-1)!) = log(4!) = log(24) = 3.1780539 Example: x = tf.constant([0, 0.5, 1, 4.5, -4, -5.6])
tf.math.lgamma(x) ==> [inf, 0.5723649, 0., 2.4537368, inf, -4.6477685]

 Args
  x   A Tensor. Must be one of the following types: bfloat16, half, float32, float64.
  name   A name for the operation (optional).

 Returns   A Tensor. Has the same type as x.


tf.raw_ops.LinSpace Generates values in an interval.  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.LinSpace
tf.raw_ops.LinSpace(
    start, stop, num, name=None
)
 A sequence of num evenly-spaced values are generated beginning at start. If num > 1, the values in the sequence increase by stop - start / num - 1, so that the last one is exactly stop. For example: tf.linspace(10.0, 12.0, 3, name="linspace") => [ 10.0  11.0  12.0]

 Args
  start   A Tensor. Must be one of the following types: bfloat16, half, float32, float64. 0-D tensor. First entry in the range.
  stop   A Tensor. Must have the same type as start. 0-D tensor. Last entry in the range.
  num   A Tensor. Must be one of the following types: int32, int64. 0-D tensor. Number of values to generate.
  name   A name for the operation (optional).

 Returns   A Tensor. Has the same type as start.


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

 Args
  x   A Tensor. 1-D. Values to keep.
  y   A Tensor. Must have the same type as x. 1-D. Values to remove.
  out_idx   An optional tf.DType from: tf.int32, tf.int64. Defaults to tf.int32.
  name   A name for the operation (optional).

 Returns   A tuple of Tensor objects (out, idx).     out   A Tensor. Has the same type as x.
  idx   A Tensor of type out_idx.


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

 Args
  filenames   A Tensor of type string. A scalar or a vector containing the name(s) of the binary file(s) to be read.
  output_types   A list of tf.DTypes that has length >= 1.
  output_shapes   A list of shapes (each a tf.TensorShape or list of ints) that has length >= 1.
  name   A name for the operation (optional).

 Returns   A Tensor of type variant.


tf.raw_ops.LMDBReader A Reader that outputs the records from a LMDB file.  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.LMDBReader
tf.raw_ops.LMDBReader(
    container='', shared_name='', name=None
)

 Args
  container   An optional string. Defaults to "". If non-empty, this reader is placed in the given container. Otherwise, a default container is used.
  shared_name   An optional string. Defaults to "". If non-empty, this reader is named in the given bucket with this shared_name. Otherwise, the node name is used instead.
  name   A name for the operation (optional).

 Returns   A Tensor of type mutable string.


tf.raw_ops.LoadAndRemapMatrix Loads a 2-D (matrix) Tensor with name old_tensor_name from the checkpoint  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.LoadAndRemapMatrix
tf.raw_ops.LoadAndRemapMatrix(
    ckpt_path, old_tensor_name, row_remapping, col_remapping, initializing_values,
    num_rows, num_cols, max_rows_in_memory=-1, name=None
)
 at ckpt_path and potentially reorders its rows and columns using the specified remappings. Most users should use one of the wrapper initializers (such as tf.contrib.framework.load_and_remap_matrix_initializer) instead of this function directly. The remappings are 1-D tensors with the following properties:
row_remapping must have exactly num_rows entries. Row i of the output matrix will be initialized from the row corresponding to index row_remapping[i] in the old Tensor from the checkpoint.
col_remapping must have either 0 entries (indicating that no column reordering is needed) or num_cols entries. If specified, column j of the output matrix will be initialized from the column corresponding to index col_remapping[j] in the old Tensor from the checkpoint. A value of -1 in either of the remappings signifies a "missing" entry. In that case, values from the initializing_values tensor will be used to fill that missing row or column. If row_remapping has r missing entries and col_remapping has c missing entries, then the following condition must be true:  (r * num_cols) + (c * num_rows) - (r * c) == len(initializing_values) The remapping tensors can be generated using the GenerateVocabRemapping op. As an example, with row_remapping = [1, 0, -1], col_remapping = [0, 2, -1], initializing_values = [0.5, -0.5, 0.25, -0.25, 42], and w(i, j) representing the value from row i, column j of the old tensor in the checkpoint, the output matrix will look like the following: [[w(1, 0), w(1, 2), 0.5], [w(0, 0), w(0, 2), -0.5], [0.25, -0.25, 42]]

 Args
  ckpt_path   A Tensor of type string. Path to the TensorFlow checkpoint (version 2, TensorBundle) from which the old matrix Tensor will be loaded.
  old_tensor_name   A Tensor of type string. Name of the 2-D Tensor to load from checkpoint.
  row_remapping   A Tensor of type int64. An int Tensor of row remappings (generally created by generate_vocab_remapping). Even if no row remapping is needed, this must still be an index-valued Tensor (e.g. [0, 1, 2, ...]), or a shifted index-valued Tensor (e.g. [8, 9, 10, ...], for partitioned Variables).
  col_remapping   A Tensor of type int64. An int Tensor of column remappings (generally created by generate_vocab_remapping). May be a size-0 Tensor if only row remapping is to be done (e.g. column ordering is the same).
  initializing_values   A Tensor of type float32. A float Tensor containing values to fill in for cells in the output matrix that are not loaded from the checkpoint. Length must be exactly the same as the number of missing / new cells.
  num_rows   An int that is >= 0. Number of rows (length of the 1st dimension) in the output matrix.
  num_cols   An int that is >= 1. Number of columns (length of the 2nd dimension) in the output matrix.
  max_rows_in_memory   An optional int. Defaults to -1. The maximum number of rows to load from the checkpoint at once. If less than or equal to 0, the entire matrix will be loaded into memory. Setting this arg trades increased disk reads for lower memory usage.
  name   A name for the operation (optional).

 Returns   A Tensor of type float32.


tf.raw_ops.LoadDataset  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.LoadDataset
tf.raw_ops.LoadDataset(
    path, reader_func_other_args, output_types, output_shapes, reader_func,
    compression='', name=None
)

 Args
  path   A Tensor of type string.
  reader_func_other_args   A list of Tensor objects.
  output_types   A list of tf.DTypes that has length >= 1.
  output_shapes   A list of shapes (each a tf.TensorShape or list of ints) that has length >= 1.
  reader_func   A function decorated with @Defun.
  compression   An optional string. Defaults to "".
  name   A name for the operation (optional).

 Returns   A Tensor of type variant.


tf.raw_ops.LoadTPUEmbeddingAdadeltaParameters Load Adadelta embedding parameters.  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.LoadTPUEmbeddingAdadeltaParameters
tf.raw_ops.LoadTPUEmbeddingAdadeltaParameters(
    parameters, accumulators, updates, num_shards, shard_id, table_id=-1,
    table_name='', config='', name=None
)
 An op that loads optimization parameters into HBM for embedding. Must be preceded by a ConfigureTPUEmbeddingHost op that sets up the correct embedding table configuration. For example, this op is used to install parameters that are loaded from a checkpoint before a training loop is executed.

 Args
  parameters   A Tensor of type float32. Value of parameters used in the Adadelta optimization algorithm.
  accumulators   A Tensor of type float32. Value of accumulators used in the Adadelta optimization algorithm.
  updates   A Tensor of type float32. Value of updates used in the Adadelta optimization algorithm.
  num_shards   An int.
  shard_id   An int.
  table_id   An optional int. Defaults to -1.
  table_name   An optional string. Defaults to "".
  config   An optional string. Defaults to "".
  name   A name for the operation (optional).

 Returns   The created Operation.


tf.raw_ops.LoadTPUEmbeddingAdadeltaParametersGradAccumDebug Load Adadelta parameters with debug support.  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.LoadTPUEmbeddingAdadeltaParametersGradAccumDebug
tf.raw_ops.LoadTPUEmbeddingAdadeltaParametersGradAccumDebug(
    parameters, accumulators, updates, gradient_accumulators, num_shards, shard_id,
    table_id=-1, table_name='', config='', name=None
)
 An op that loads optimization parameters into HBM for embedding. Must be preceded by a ConfigureTPUEmbeddingHost op that sets up the correct embedding table configuration. For example, this op is used to install parameters that are loaded from a checkpoint before a training loop is executed.

 Args
  parameters   A Tensor of type float32. Value of parameters used in the Adadelta optimization algorithm.
  accumulators   A Tensor of type float32. Value of accumulators used in the Adadelta optimization algorithm.
  updates   A Tensor of type float32. Value of updates used in the Adadelta optimization algorithm.
  gradient_accumulators   A Tensor of type float32. Value of gradient_accumulators used in the Adadelta optimization algorithm.
  num_shards   An int.
  shard_id   An int.
  table_id   An optional int. Defaults to -1.
  table_name   An optional string. Defaults to "".
  config   An optional string. Defaults to "".
  name   A name for the operation (optional).

 Returns   The created Operation.


tf.raw_ops.LoadTPUEmbeddingAdagradParameters Load Adagrad embedding parameters.  View aliases  Compat aliases for migration
See Migration guide for more details. tf.compat.v1.raw_ops.LoadTPUEmbeddingAdagradParameters
tf.raw_ops.LoadTPUEmbeddingAdagradParameters(
    parameters, accumulators, num_shards, shard_id, table_id=-1,
    table_name='', config='', name=None
)
 An op that loads optimization parameters into HBM for embedding. Must be preceded by a ConfigureTPUEmbeddingHost op that sets up the correct embedding table configuration. For example, this op is used to install parameters that are loaded from a checkpoint before a training loop is executed.

 Args
  parameters   A Tensor of type float32. Value of parameters used in the Adagrad optimization algorithm.
  accumulators   A Tensor of type float32. Value of accumulators used in the Adagrad optimization algorithm.
  num_shards   An int.
  shard_id   An int.
  table_id   An optional int. Defaults to -1.
  table_name   An optional string. Defaults to "".
  config   An optional string. Defaults to "".
  name   A name for the operation (optional).

 Returns   The created Operation.