neulab/docprompting-conala huggingface dataset:
tf.compat.v1.scatter_add Adds sparse updates to the variable referenced by resource. 
tf.compat.v1.scatter_add(
    ref, indices, updates, use_locking=False, name=None
)
 This operation computes # Scalar indices
ref[indices, ...] += updates[...]

# Vector indices (for each i)
ref[indices[i], ...] += updates[i, ...]

# High rank indices (for each i, ..., j)
ref[indices[i, ..., j], ...] += updates[i, ..., j, ...]
 This operation outputs ref after the update is done. This makes it easier to chain operations that need to use the updated value. Duplicate entries are handled correctly: if multiple indices reference the same location, their contributions add. Requires updates.shape = indices.shape + ref.shape[1:].   
 


 Args
  ref   A Variable.  
  indices   A Tensor. Must be one of the following types: int32, int64. A tensor of indices into the first dimension of ref.  
  updates   A Tensor. Must have the same type as ref. A tensor of updated values to store in ref.  
  use_locking   An optional bool. Defaults to False. If True, the assignment will be protected by a lock; otherwise the behavior is undefined, but may exhibit less contention.  
  name   A name for the operation (optional).   
 


 Returns   Same as ref. Returned as a convenience for operations that want to use the updated values after the update is done.
tf.compat.v1.scatter_div Divides a variable reference by sparse updates. 
tf.compat.v1.scatter_div(
    ref, indices, updates, use_locking=False, name=None
)
 This operation computes # Scalar indices
ref[indices, ...] /= updates[...]

# Vector indices (for each i)
ref[indices[i], ...] /= updates[i, ...]

# High rank indices (for each i, ..., j)
ref[indices[i, ..., j], ...] /= updates[i, ..., j, ...]
 This operation outputs ref after the update is done. This makes it easier to chain operations that need to use the reset value. Duplicate entries are handled correctly: if multiple indices reference the same location, their contributions divide. Requires updates.shape = indices.shape + ref.shape[1:] or updates.shape = [].
 


 Args
  ref   A mutable Tensor. Must be one of the following types: float32, float64, int32, uint8, int16, int8, complex64, int64, qint8, quint8, qint32, bfloat16, uint16, complex128, half, uint32, uint64. Should be from a Variable node.  
  indices   A Tensor. Must be one of the following types: int32, int64. A tensor of indices into the first dimension of ref.  
  updates   A Tensor. Must have the same type as ref. A tensor of values that ref is divided by.  
  use_locking   An optional bool. Defaults to False. If True, the operation will be protected by a lock; otherwise the behavior is undefined, but may exhibit less contention.  
  name   A name for the operation (optional).   
 


 Returns   A mutable Tensor. Has the same type as ref.
tf.compat.v1.scatter_max Reduces sparse updates into a variable reference using the max operation. 
tf.compat.v1.scatter_max(
    ref, indices, updates, use_locking=False, name=None
)
 This operation computes # Scalar indices
ref[indices, ...] = max(ref[indices, ...], updates[...])

# Vector indices (for each i)
ref[indices[i], ...] = max(ref[indices[i], ...], updates[i, ...])

# High rank indices (for each i, ..., j)
ref[indices[i, ..., j], ...] = max(ref[indices[i, ..., j], ...],
updates[i, ..., j, ...])
 This operation outputs ref after the update is done. This makes it easier to chain operations that need to use the reset value. Duplicate entries are handled correctly: if multiple indices reference the same location, their contributions combine. Requires updates.shape = indices.shape + ref.shape[1:] or updates.shape = [].   
 


 Args
  ref   A mutable Tensor. Must be one of the following types: half, bfloat16, float32, float64, int32, int64. Should be from a Variable node.  
  indices   A Tensor. Must be one of the following types: int32, int64. A tensor of indices into the first dimension of ref.  
  updates   A Tensor. Must have the same type as ref. A tensor of updated values to reduce into ref.  
  use_locking   An optional bool. Defaults to False. If True, the update will be protected by a lock; otherwise the behavior is undefined, but may exhibit less contention.  
  name   A name for the operation (optional).   
 


 Returns   A mutable Tensor. Has the same type as ref.
tf.compat.v1.scatter_min Reduces sparse updates into a variable reference using the min operation. 
tf.compat.v1.scatter_min(
    ref, indices, updates, use_locking=False, name=None
)
 This operation computes # Scalar indices
ref[indices, ...] = min(ref[indices, ...], updates[...])

# Vector indices (for each i)
ref[indices[i], ...] = min(ref[indices[i], ...], updates[i, ...])

# High rank indices (for each i, ..., j)
ref[indices[i, ..., j], ...] = min(ref[indices[i, ..., j], ...],
updates[i, ..., j, ...])
 This operation outputs ref after the update is done. This makes it easier to chain operations that need to use the reset value. Duplicate entries are handled correctly: if multiple indices reference the same location, their contributions combine. Requires updates.shape = indices.shape + ref.shape[1:] or updates.shape = [].   
 


 Args
  ref   A mutable Tensor. Must be one of the following types: half, bfloat16, float32, float64, int32, int64. Should be from a Variable node.  
  indices   A Tensor. Must be one of the following types: int32, int64. A tensor of indices into the first dimension of ref.  
  updates   A Tensor. Must have the same type as ref. A tensor of updated values to reduce into ref.  
  use_locking   An optional bool. Defaults to False. If True, the update will be protected by a lock; otherwise the behavior is undefined, but may exhibit less contention.  
  name   A name for the operation (optional).   
 


 Returns   A mutable Tensor. Has the same type as ref.
tf.compat.v1.scatter_mul Multiplies sparse updates into a variable reference. 
tf.compat.v1.scatter_mul(
    ref, indices, updates, use_locking=False, name=None
)
 This operation computes # Scalar indices
ref[indices, ...] *= updates[...]

# Vector indices (for each i)
ref[indices[i], ...] *= updates[i, ...]

# High rank indices (for each i, ..., j)
ref[indices[i, ..., j], ...] *= updates[i, ..., j, ...]
 This operation outputs ref after the update is done. This makes it easier to chain operations that need to use the reset value. Duplicate entries are handled correctly: if multiple indices reference the same location, their contributions multiply. Requires updates.shape = indices.shape + ref.shape[1:] or updates.shape = [].
 


 Args
  ref   A mutable Tensor. Must be one of the following types: float32, float64, int32, uint8, int16, int8, complex64, int64, qint8, quint8, qint32, bfloat16, uint16, complex128, half, uint32, uint64. Should be from a Variable node.  
  indices   A Tensor. Must be one of the following types: int32, int64. A tensor of indices into the first dimension of ref.  
  updates   A Tensor. Must have the same type as ref. A tensor of updated values to multiply to ref.  
  use_locking   An optional bool. Defaults to False. If True, the operation will be protected by a lock; otherwise the behavior is undefined, but may exhibit less contention.  
  name   A name for the operation (optional).   
 


 Returns   A mutable Tensor. Has the same type as ref.
tf.compat.v1.scatter_nd_add Applies sparse addition to individual values or slices in a Variable. 
tf.compat.v1.scatter_nd_add(
    ref, indices, updates, use_locking=False, name=None
)
 ref is a Tensor with rank P and indices is a Tensor of rank Q. indices must be integer tensor, containing indices into ref. It must be shape [d_0, ..., d_{Q-2}, K] where 0 < K <= P. The innermost dimension of indices (with length K) corresponds to indices into elements (if K = P) or slices (if K < P) along the Kth dimension of ref. updates is Tensor of rank Q-1+P-K with shape: [d_0, ..., d_{Q-2}, ref.shape[K], ..., ref.shape[P-1]]
 For example, say we want to add 4 scattered elements to a rank-1 tensor to 8 elements. In Python, that addition would look like this: ref = tf.Variable([1, 2, 3, 4, 5, 6, 7, 8])
indices = tf.constant([[4], [3], [1], [7]])
updates = tf.constant([9, 10, 11, 12])
add = tf.compat.v1.scatter_nd_add(ref, indices, updates)
with tf.compat.v1.Session() as sess:
  print sess.run(add)
 The resulting update to ref would look like this: [1, 13, 3, 14, 14, 6, 7, 20]
 See tf.scatter_nd for more details about how to make updates to slices.
 


 Args
  ref   A mutable Tensor. Must be one of the following types: float32, float64, int32, uint8, int16, int8, complex64, int64, qint8, quint8, qint32, bfloat16, uint16, complex128, half, uint32, uint64. A mutable Tensor. Should be from a Variable node.  
  indices   A Tensor. Must be one of the following types: int32, int64. A tensor of indices into ref.  
  updates   A Tensor. Must have the same type as ref. A tensor of updated values to add to ref.  
  use_locking   An optional bool. Defaults to False. If True, the assignment will be protected by a lock; otherwise the behavior is undefined, but may exhibit less contention.  
  name   A name for the operation (optional).   
 


 Returns   A mutable Tensor. Has the same type as ref.
tf.compat.v1.scatter_nd_sub Applies sparse subtraction to individual values or slices in a Variable. 
tf.compat.v1.scatter_nd_sub(
    ref, indices, updates, use_locking=False, name=None
)
 ref is a Tensor with rank P and indices is a Tensor of rank Q. indices must be integer tensor, containing indices into ref. It must be shape [d_0, ..., d_{Q-2}, K] where 0 < K <= P. The innermost dimension of indices (with length K) corresponds to indices into elements (if K = P) or slices (if K < P) along the Kth dimension of ref. updates is Tensor of rank Q-1+P-K with shape: [d_0, ..., d_{Q-2}, ref.shape[K], ..., ref.shape[P-1]]
 For example, say we want to subtract 4 scattered elements from a rank-1 tensor with 8 elements. In Python, that update would look like this: ref = tf.Variable([1, 2, 3, 4, 5, 6, 7, 8])
indices = tf.constant([[4], [3], [1] ,[7]])
updates = tf.constant([9, 10, 11, 12])
op = tf.compat.v1.scatter_nd_sub(ref, indices, updates)
with tf.compat.v1.Session() as sess:
  print sess.run(op)
 The resulting update to ref would look like this: [1, -9, 3, -6, -6, 6, 7, -4]
 See tf.scatter_nd for more details about how to make updates to slices.
 


 Args
  ref   A mutable Tensor. Must be one of the following types: float32, float64, int32, uint8, int16, int8, complex64, int64, qint8, quint8, qint32, bfloat16, uint16, complex128, half, uint32, uint64. A mutable Tensor. Should be from a Variable node.  
  indices   A Tensor. Must be one of the following types: int32, int64. A tensor of indices into ref.  
  updates   A Tensor. Must have the same type as ref. A tensor of updated values to add to ref.  
  use_locking   An optional bool. Defaults to False. An optional bool. Defaults to True. If True, the assignment will be protected by a lock; otherwise the behavior is undefined, but may exhibit less contention.  
  name   A name for the operation (optional).   
 


 Returns   A mutable Tensor. Has the same type as ref.
tf.compat.v1.scatter_nd_update Applies sparse updates to individual values or slices in a Variable. 
tf.compat.v1.scatter_nd_update(
    ref, indices, updates, use_locking=True, name=None
)
 ref is a Tensor with rank P and indices is a Tensor of rank Q. indices must be integer tensor, containing indices into ref. It must be shape [d_0, ..., d_{Q-2}, K] where 0 < K <= P. The innermost dimension of indices (with length K) corresponds to indices into elements (if K = P) or slices (if K < P) along the Kth dimension of ref. updates is Tensor of rank Q-1+P-K with shape: [d_0, ..., d_{Q-2}, ref.shape[K], ..., ref.shape[P-1]].
 For example, say we want to update 4 scattered elements to a rank-1 tensor to 8 elements. In Python, that update would look like this: ref = tf.Variable([1, 2, 3, 4, 5, 6, 7, 8])
indices = tf.constant([[4], [3], [1] ,[7]])
updates = tf.constant([9, 10, 11, 12])
update = tf.compat.v1.scatter_nd_update(ref, indices, updates)
with tf.compat.v1.Session() as sess:
  print sess.run(update)
 The resulting update to ref would look like this: [1, 11, 3, 10, 9, 6, 7, 12]
 See tf.scatter_nd for more details about how to make updates to slices.
 


 Args
  ref   A Variable.  
  indices   A Tensor. Must be one of the following types: int32, int64. A tensor of indices into ref.  
  updates   A Tensor. Must have the same type as ref. A Tensor. Must have the same type as ref. A tensor of updated values to add to ref.  
  use_locking   An optional bool. Defaults to True. An optional bool. Defaults to True. If True, the assignment will be protected by a lock; otherwise the behavior is undefined, but may exhibit less contention.  
  name   A name for the operation (optional).   
 


 Returns   The value of the variable after the update.
tf.compat.v1.scatter_sub Subtracts sparse updates to a variable reference. 
tf.compat.v1.scatter_sub(
    ref, indices, updates, use_locking=False, name=None
)
 # Scalar indices
ref[indices, ...] -= updates[...]

# Vector indices (for each i)
ref[indices[i], ...] -= updates[i, ...]

# High rank indices (for each i, ..., j)
ref[indices[i, ..., j], ...] -= updates[i, ..., j, ...]
 This operation outputs ref after the update is done. This makes it easier to chain operations that need to use the reset value. Duplicate entries are handled correctly: if multiple indices reference the same location, their (negated) contributions add. Requires updates.shape = indices.shape + ref.shape[1:] or updates.shape = [].   
 


 Args
  ref   A mutable Tensor. Must be one of the following types: float32, float64, int32, uint8, int16, int8, complex64, int64, qint8, quint8, qint32, bfloat16, uint16, complex128, half, uint32, uint64. Should be from a Variable node.  
  indices   A Tensor. Must be one of the following types: int32, int64. A tensor of indices into the first dimension of ref.  
  updates   A Tensor. Must have the same type as ref. A tensor of updated values to subtract from ref.  
  use_locking   An optional bool. Defaults to False. If True, the subtraction will be protected by a lock; otherwise the behavior is undefined, but may exhibit less contention.  
  name   A name for the operation (optional).   
 


 Returns   A mutable Tensor. Has the same type as ref.
tf.compat.v1.scatter_update Applies sparse updates to a variable reference. 
tf.compat.v1.scatter_update(
    ref, indices, updates, use_locking=True, name=None
)
 This operation computes # Scalar indices
ref[indices, ...] = updates[...]

# Vector indices (for each i)
ref[indices[i], ...] = updates[i, ...]

# High rank indices (for each i, ..., j)
ref[indices[i, ..., j], ...] = updates[i, ..., j, ...]
 This operation outputs ref after the update is done. This makes it easier to chain operations that need to use the reset value. If values in ref is to be updated more than once, because there are duplicate entries in indices, the order at which the updates happen for each value is undefined. Requires updates.shape = indices.shape + ref.shape[1:].   
 


 Args
  ref   A Variable.  
  indices   A Tensor. Must be one of the following types: int32, int64. A tensor of indices into the first dimension of ref.  
  updates   A Tensor. Must have the same type as ref. A tensor of updated values to store in ref.  
  use_locking   An optional bool. Defaults to True. If True, the assignment will be protected by a lock; otherwise the behavior is undefined, but may exhibit less contention.  
  name   A name for the operation (optional).   
 


 Returns   Same as ref. Returned as a convenience for operations that want to use the updated values after the update is done.
tf.compat.v1.serialize_many_sparse Serialize N-minibatch SparseTensor into an [N, 3] Tensor.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.io.serialize_many_sparse  
tf.compat.v1.serialize_many_sparse(
    sp_input, name=None, out_type=tf.dtypes.string
)
 The SparseTensor must have rank R greater than 1, and the first dimension is treated as the minibatch dimension. Elements of the SparseTensor must be sorted in increasing order of this first dimension. The serialized SparseTensor objects going into each row of the output Tensor will have rank R-1. The minibatch size N is extracted from sparse_shape[0].
 


 Args
  sp_input   The input rank R SparseTensor.  
  name   A name prefix for the returned tensors (optional).  
  out_type   The dtype to use for serialization.   
 


 Returns   A matrix (2-D Tensor) with N rows and 3 columns. Each column represents serialized SparseTensor's indices, values, and shape (respectively).  

 


 Raises
  TypeError   If sp_input is not a SparseTensor.
tf.compat.v1.serialize_sparse Serialize a SparseTensor into a 3-vector (1-D Tensor) object.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.io.serialize_sparse  
tf.compat.v1.serialize_sparse(
    sp_input, name=None, out_type=tf.dtypes.string
)

 


 Args
  sp_input   The input SparseTensor.  
  name   A name prefix for the returned tensors (optional).  
  out_type   The dtype to use for serialization.   
 


 Returns   A 3-vector (1-D Tensor), with each column representing the serialized SparseTensor's indices, values, and shape (respectively).  

 


 Raises
  TypeError   If sp_input is not a SparseTensor.
tf.compat.v1.SessionLog A ProtocolMessage  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.summary.SessionLog 
 


 Attributes
  checkpoint_path   string checkpoint_path  
  msg   string msg  
  status   SessionStatus status   
 


 Class Variables
  CHECKPOINT   3  
  START   1  
  STATUS_UNSPECIFIED   0  
  STOP   2  
  SessionStatus
tf.compat.v1.setdiff1d Computes the difference between two lists of numbers or strings. 
tf.compat.v1.setdiff1d(
    x, y, index_dtype=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.
Module: tf.compat.v1.sets Tensorflow set operations. Functions difference(...): Compute set difference of elements in last dimension of a and b. intersection(...): Compute set intersection of elements in last dimension of a and b. set_difference(...): Compute set difference of elements in last dimension of a and b. set_intersection(...): Compute set intersection of elements in last dimension of a and b. set_size(...): Compute number of unique elements along last dimension of a. set_union(...): Compute set union of elements in last dimension of a and b. size(...): Compute number of unique elements along last dimension of a. union(...): Compute set union of elements in last dimension of a and b.
tf.compat.v1.shape Returns the shape of a tensor. 
tf.compat.v1.shape(
    input, name=None, out_type=tf.dtypes.int32
)
 This operation returns a 1-D integer tensor representing the shape of input. For example: t = tf.constant([[[1, 1, 1], [2, 2, 2]], [[3, 3, 3], [4, 4, 4]]])
tf.shape(t)  # [2, 2, 3]

 


 Args
  input   A Tensor or SparseTensor.  
  name   A name for the operation (optional).  
  out_type   (Optional) The specified output type of the operation (int32 or int64). Defaults to tf.int32.   
 


 Returns   A Tensor of type out_type.
Module: tf.compat.v1.signal Signal processing operations. See the tf.signal guide. Functions dct(...): Computes the 1D [Discrete Cosine Transform (DCT)][dct] of input. fft(...): Fast Fourier transform. fft2d(...): 2D fast Fourier transform. fft3d(...): 3D fast Fourier transform. fftshift(...): Shift the zero-frequency component to the center of the spectrum. frame(...): Expands signal's axis dimension into frames of frame_length. hamming_window(...): Generate a Hamming window. hann_window(...): Generate a Hann window. idct(...): Computes the 1D [Inverse Discrete Cosine Transform (DCT)][idct] of input. ifft(...): Inverse fast Fourier transform. ifft2d(...): Inverse 2D fast Fourier transform. ifft3d(...): Inverse 3D fast Fourier transform. ifftshift(...): The inverse of fftshift. inverse_mdct(...): Computes the inverse modified DCT of mdcts. inverse_stft(...): Computes the inverse Short-time Fourier Transform of stfts. inverse_stft_window_fn(...): Generates a window function that can be used in inverse_stft. irfft(...): Inverse real-valued fast Fourier transform. irfft2d(...): Inverse 2D real-valued fast Fourier transform. irfft3d(...): Inverse 3D real-valued fast Fourier transform. kaiser_bessel_derived_window(...): Generate a [Kaiser Bessel derived window][kbd]. kaiser_window(...): Generate a [Kaiser window][kaiser]. linear_to_mel_weight_matrix(...): Returns a matrix to warp linear scale spectrograms to the mel scale. mdct(...): Computes the [Modified Discrete Cosine Transform][mdct] of signals. mfccs_from_log_mel_spectrograms(...): Computes MFCCs of log_mel_spectrograms. overlap_and_add(...): Reconstructs a signal from a framed representation. rfft(...): Real-valued fast Fourier transform. rfft2d(...): 2D real-valued fast Fourier transform. rfft3d(...): 3D real-valued fast Fourier transform. stft(...): Computes the Short-time Fourier Transform of signals. vorbis_window(...): Generate a [Vorbis power complementary window][vorbis].
tf.compat.v1.size Returns the size of a tensor. 
tf.compat.v1.size(
    input, name=None, out_type=tf.dtypes.int32
)
 Returns a 0-D Tensor representing the number of elements in input of type out_type. Defaults to tf.int32. For example: t = tf.constant([[[1, 1, 1], [2, 2, 2]], [[3, 3, 3], [4, 4, 4]]])
tf.size(t)  # 12

 


 Args
  input   A Tensor or SparseTensor.  
  name   A name for the operation (optional).  
  out_type   (Optional) The specified non-quantized numeric output type of the operation. Defaults to tf.int32.   
 


 Returns   A Tensor of type out_type. Defaults to tf.int32.  
 Numpy Compatibility Equivalent to np.size()