neulab/docprompting-conala huggingface dataset:
tf.raw_ops.SparseApplyFtrlV2 Update relevant entries in '*var' according to the Ftrl-proximal scheme.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.raw_ops.SparseApplyFtrlV2  
tf.raw_ops.SparseApplyFtrlV2(
    var, accum, linear, grad, indices, lr, l1, l2, l2_shrinkage, lr_power,
    use_locking=False, multiply_linear_by_lr=False, name=None
)
 That is for rows we have grad for, we update var, accum and linear as follows: grad_with_shrinkage = grad + 2 * l2_shrinkage * var accum_new = accum + grad * grad linear += grad_with_shrinkage - (accum_new^(-lr_power) - accum^(-lr_power)) / lr * var quadratic = 1.0 / (accum_new^(lr_power) * lr) + 2 * l2 var = (sign(linear) * l1 - linear) / quadratic if |linear| > l1 else 0.0 accum = accum_new
 


 Args
  var   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().  
  accum   A mutable Tensor. Must have the same type as var. Should be from a Variable().  
  linear   A mutable Tensor. Must have the same type as var. Should be from a Variable().  
  grad   A Tensor. Must have the same type as var. The gradient.  
  indices   A Tensor. Must be one of the following types: int32, int64. A vector of indices into the first dimension of var and accum.  
  lr   A Tensor. Must have the same type as var. Scaling factor. Must be a scalar.  
  l1   A Tensor. Must have the same type as var. L1 regularization. Must be a scalar.  
  l2   A Tensor. Must have the same type as var. L2 shrinkage regularization. Must be a scalar.  
  l2_shrinkage   A Tensor. Must have the same type as var.  
  lr_power   A Tensor. Must have the same type as var. Scaling factor. Must be a scalar.  
  use_locking   An optional bool. Defaults to False. If True, updating of the var and accum tensors will be protected by a lock; otherwise the behavior is undefined, but may exhibit less contention.  
  multiply_linear_by_lr   An optional bool. Defaults to False.  
  name   A name for the operation (optional).   
 


 Returns   A mutable Tensor. Has the same type as var.
tf.raw_ops.SparseApplyMomentum   Update relevant entries in 'var' and 'accum' according to the momentum scheme.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.raw_ops.SparseApplyMomentum  
tf.raw_ops.SparseApplyMomentum(
    var, accum, lr, grad, indices, momentum, use_locking=False, use_nesterov=False,
    name=None
)
 Set use_nesterov = True if you want to use Nesterov momentum. That is for rows we have grad for, we update var and accum as follows:  $$accum = accum * momentum + grad$$   $$var -= lr * accum$$ 
 


 Args
  var   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().  
  accum   A mutable Tensor. Must have the same type as var. Should be from a Variable().  
  lr   A Tensor. Must have the same type as var. Learning rate. Must be a scalar.  
  grad   A Tensor. Must have the same type as var. The gradient.  
  indices   A Tensor. Must be one of the following types: int32, int64. A vector of indices into the first dimension of var and accum.  
  momentum   A Tensor. Must have the same type as var. Momentum. Must be a scalar.  
  use_locking   An optional bool. Defaults to False. If True, updating of the var and accum tensors will be protected by a lock; otherwise the behavior is undefined, but may exhibit less contention.  
  use_nesterov   An optional bool. Defaults to False. If True, the tensor passed to compute grad will be var - lr * momentum * accum, so in the end, the var you get is actually var - lr * momentum * accum.  
  name   A name for the operation (optional).   
 


 Returns   A mutable Tensor. Has the same type as var.
tf.raw_ops.SparseApplyProximalAdagrad   Sparse update entries in 'var' and 'accum' according to FOBOS algorithm.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.raw_ops.SparseApplyProximalAdagrad  
tf.raw_ops.SparseApplyProximalAdagrad(
    var, accum, lr, l1, l2, grad, indices, use_locking=False, name=None
)
 That is for rows we have grad for, we update var and accum as follows:  $$accum += grad * grad$$   $$prox_v = var$$   $$prox_v -= lr * grad * (1 / sqrt(accum))$$   $$var = sign(prox_v)/(1+lr*l2) * max{|prox_v|-lr*l1,0}$$ 
 


 Args
  var   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().  
  accum   A mutable Tensor. Must have the same type as var. Should be from a Variable().  
  lr   A Tensor. Must have the same type as var. Learning rate. Must be a scalar.  
  l1   A Tensor. Must have the same type as var. L1 regularization. Must be a scalar.  
  l2   A Tensor. Must have the same type as var. L2 regularization. Must be a scalar.  
  grad   A Tensor. Must have the same type as var. The gradient.  
  indices   A Tensor. Must be one of the following types: int32, int64. A vector of indices into the first dimension of var and accum.  
  use_locking   An optional bool. Defaults to False. If True, updating of the var and accum tensors will be protected by a lock; otherwise the behavior is undefined, but may exhibit less contention.  
  name   A name for the operation (optional).   
 


 Returns   A mutable Tensor. Has the same type as var.
tf.raw_ops.SparseApplyProximalGradientDescent   Sparse update '*var' as FOBOS algorithm with fixed learning rate.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.raw_ops.SparseApplyProximalGradientDescent  
tf.raw_ops.SparseApplyProximalGradientDescent(
    var, alpha, l1, l2, grad, indices, use_locking=False, name=None
)
 That is for rows we have grad for, we update var as follows:  $$prox_v = var - alpha * grad$$   $$var = sign(prox_v)/(1+alpha*l2) * max{|prox_v|-alpha*l1,0}$$ 
 


 Args
  var   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().  
  alpha   A Tensor. Must have the same type as var. Scaling factor. Must be a scalar.  
  l1   A Tensor. Must have the same type as var. L1 regularization. Must be a scalar.  
  l2   A Tensor. Must have the same type as var. L2 regularization. Must be a scalar.  
  grad   A Tensor. Must have the same type as var. The gradient.  
  indices   A Tensor. Must be one of the following types: int32, int64. A vector of indices into the first dimension of var and accum.  
  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 var.
tf.raw_ops.SparseApplyRMSProp   Update '*var' according to the RMSProp algorithm.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.raw_ops.SparseApplyRMSProp  
tf.raw_ops.SparseApplyRMSProp(
    var, ms, mom, lr, rho, momentum, epsilon, grad, indices, use_locking=False,
    name=None
)
 Note that in dense implementation of this algorithm, ms and mom will update even if the grad is zero, but in this sparse implementation, ms and mom will not update in iterations during which the grad is zero. mean_square = decay * mean_square + (1-decay) * gradient ** 2 Delta = learning_rate * gradient / sqrt(mean_square + epsilon)  $$ms  $$mom  $$var  
 


 Args
  var   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().  
  ms   A mutable Tensor. Must have the same type as var. Should be from a Variable().  
  mom   A mutable Tensor. Must have the same type as var. Should be from a Variable().  
  lr   A Tensor. Must have the same type as var. Scaling factor. Must be a scalar.  
  rho   A Tensor. Must have the same type as var. Decay rate. Must be a scalar.  
  momentum   A Tensor. Must have the same type as var.  
  epsilon   A Tensor. Must have the same type as var. Ridge term. Must be a scalar.  
  grad   A Tensor. Must have the same type as var. The gradient.  
  indices   A Tensor. Must be one of the following types: int32, int64. A vector of indices into the first dimension of var, ms and mom.  
  use_locking   An optional bool. Defaults to False. If True, updating of the var, ms, and mom tensors is 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 var.  
     Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates. Some content is licensed under the numpy license. Last updated 2021-02-18 UTC.        Stay connected    Blog     GitHub     Twitter     YouTube      Support    Issue tracker     Release notes     Stack Overflow     Brand guidelines     Cite TensorFlow              Terms     Privacy    Sign up for the TensorFlow monthly newsletter  Subscribe       Language  English   中文 – 简体
tf.raw_ops.SparseBincount Counts the number of occurrences of each value in an integer array.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.raw_ops.SparseBincount  
tf.raw_ops.SparseBincount(
    indices, values, dense_shape, size, weights, binary_output=False, name=None
)
 Outputs a vector with length size and the same dtype as weights. If weights are empty, then index i stores the number of times the value i is counted in arr. If weights are non-empty, then index i stores the sum of the value in weights at each index where the corresponding value in arr is i. Values in arr outside of the range [0, size) are ignored.
 


 Args
  indices   A Tensor of type int64. 2D int64 Tensor.  
  values   A Tensor. Must be one of the following types: int32, int64. 1D int Tensor.  
  dense_shape   A Tensor of type int64. 1D int64 Tensor.  
  size   A Tensor. Must have the same type as values. non-negative int scalar Tensor.  
  weights   A Tensor. Must be one of the following types: int32, int64, float32, float64. is an int32, int64, float32, or float64 Tensor with the same shape as input, or a length-0 Tensor, in which case it acts as all weights equal to 1.  
  binary_output   An optional bool. Defaults to False. bool; Whether the kernel should count the appearance or number of occurrences.  
  name   A name for the operation (optional).   
 


 Returns   A Tensor. Has the same type as weights.
tf.raw_ops.SparseConcat Concatenates a list of SparseTensor along the specified dimension.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.raw_ops.SparseConcat  
tf.raw_ops.SparseConcat(
    indices, values, shapes, concat_dim, name=None
)
 Concatenation is with respect to the dense versions of these sparse tensors. It is assumed that each input is a SparseTensor whose elements are ordered along increasing dimension number. All inputs' shapes must match, except for the concat dimension. The indices, values, and shapes lists must have the same length. The output shape is identical to the inputs', except along the concat dimension, where it is the sum of the inputs' sizes along that dimension. The output elements will be resorted to preserve the sort order along increasing dimension number. This op runs in O(M log M) time, where M is the total number of non-empty values across all inputs. This is due to the need for an internal sort in order to concatenate efficiently across an arbitrary dimension. For example, if concat_dim = 1 and the inputs are sp_inputs[0]: shape = [2, 3]
[0, 2]: "a"
[1, 0]: "b"
[1, 1]: "c"

sp_inputs[1]: shape = [2, 4]
[0, 1]: "d"
[0, 2]: "e"
 then the output will be shape = [2, 7]
[0, 2]: "a"
[0, 4]: "d"
[0, 5]: "e"
[1, 0]: "b"
[1, 1]: "c"
 Graphically this is equivalent to doing [    a] concat [  d e  ] = [    a   d e  ]
[b c  ]        [       ]   [b c          ]

 


 Args
  indices   A list of at least 2 Tensor objects with type int64. 2-D. Indices of each input SparseTensor.  
  values   A list with the same length as indices of Tensor objects with the same type. 1-D. Non-empty values of each SparseTensor.  
  shapes   A list with the same length as indices of Tensor objects with type int64. 1-D. Shapes of each SparseTensor.  
  concat_dim   An int. Dimension to concatenate along. Must be in range [-rank, rank), where rank is the number of dimensions in each input SparseTensor.  
  name   A name for the operation (optional).   
 


 Returns   A tuple of Tensor objects (output_indices, output_values, output_shape).     output_indices   A Tensor of type int64.  
  output_values   A Tensor. Has the same type as values.  
  output_shape   A Tensor of type int64.
tf.raw_ops.SparseConditionalAccumulator A conditional accumulator for aggregating sparse gradients.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.raw_ops.SparseConditionalAccumulator  
tf.raw_ops.SparseConditionalAccumulator(
    dtype, shape, container='', shared_name='',
    reduction_type='MEAN', name=None
)
 The accumulator accepts gradients marked with local_step greater or equal to the most recent global_step known to the accumulator. The average can be extracted from the accumulator, provided sufficient gradients have been accumulated. Extracting the average automatically resets the aggregate to 0, and increments the global_step recorded by the accumulator.
 


 Args
  dtype   A tf.DType from: tf.float32, tf.float64, tf.int32, tf.uint8, tf.int16, tf.int8, tf.complex64, tf.int64, tf.qint8, tf.quint8, tf.qint32, tf.bfloat16, tf.uint16, tf.complex128, tf.half, tf.uint32, tf.uint64. The type of the value being accumulated.  
  shape   A tf.TensorShape or list of ints. The shape of the values.  
  container   An optional string. Defaults to "". If non-empty, this accumulator is placed in the given container. Otherwise, a default container is used.  
  shared_name   An optional string. Defaults to "". If non-empty, this accumulator will be shared under the given name across multiple sessions.  
  reduction_type   An optional string from: "MEAN", "SUM". Defaults to "MEAN".  
  name   A name for the operation (optional).   
 


 Returns   A Tensor of type mutable string.
tf.raw_ops.SparseCountSparseOutput Performs sparse-output bin counting for a sparse tensor input.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.raw_ops.SparseCountSparseOutput  
tf.raw_ops.SparseCountSparseOutput(
    indices, values, dense_shape, weights, binary_output, minlength=-1,
    maxlength=-1, name=None
)
 Counts the number of times each value occurs in the input.
 


 Args
  indices   A Tensor of type int64. Tensor containing the indices of the sparse tensor to count.  
  values   A Tensor. Must be one of the following types: int32, int64. Tensor containing values of the sparse tensor to count.  
  dense_shape   A Tensor of type int64. Tensor containing the dense shape of the sparse tensor to count.  
  weights   A Tensor. Must be one of the following types: int32, int64, float32, float64. A Tensor of the same shape as indices containing per-index weight values. May also be the empty tensor if no weights are used.  
  binary_output   A bool. Whether to output the number of occurrences of each value or 1.  
  minlength   An optional int that is >= -1. Defaults to -1. Minimum value to count. Can be set to -1 for no minimum.  
  maxlength   An optional int that is >= -1. Defaults to -1. Maximum value to count. Can be set to -1 for no maximum.  
  name   A name for the operation (optional).   
 


 Returns   A tuple of Tensor objects (output_indices, output_values, output_dense_shape).     output_indices   A Tensor of type int64.  
  output_values   A Tensor. Has the same type as weights.  
  output_dense_shape   A Tensor of type int64.
tf.raw_ops.SparseCross Generates sparse cross from a list of sparse and dense tensors.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.raw_ops.SparseCross  
tf.raw_ops.SparseCross(
    indices, values, shapes, dense_inputs, hashed_output, num_buckets, hash_key,
    out_type, internal_type, name=None
)
 The op takes two lists, one of 2D SparseTensor and one of 2D Tensor, each representing features of one feature column. It outputs a 2D SparseTensor with the batchwise crosses of these features. For example, if the inputs are inputs[0]: SparseTensor with shape = [2, 2]
[0, 0]: "a"
[1, 0]: "b"
[1, 1]: "c"

inputs[1]: SparseTensor with shape = [2, 1]
[0, 0]: "d"
[1, 0]: "e"

inputs[2]: Tensor [["f"], ["g"]]
 then the output will be shape = [2, 2]
[0, 0]: "a_X_d_X_f"
[1, 0]: "b_X_e_X_g"
[1, 1]: "c_X_e_X_g"
 if hashed_output=true then the output will be shape = [2, 2]
[0, 0]: FingerprintCat64(
            Fingerprint64("f"), FingerprintCat64(
                Fingerprint64("d"), Fingerprint64("a")))
[1, 0]: FingerprintCat64(
            Fingerprint64("g"), FingerprintCat64(
                Fingerprint64("e"), Fingerprint64("b")))
[1, 1]: FingerprintCat64(
            Fingerprint64("g"), FingerprintCat64(
                Fingerprint64("e"), Fingerprint64("c")))

 


 Args
  indices   A list of Tensor objects with type int64. 2-D. Indices of each input SparseTensor.  
  values   A list of Tensor objects with types from: int64, string. 1-D. values of each SparseTensor.  
  shapes   A list with the same length as indices of Tensor objects with type int64. 1-D. Shapes of each SparseTensor.  
  dense_inputs   A list of Tensor objects with types from: int64, string. 2-D. Columns represented by dense Tensor.  
  hashed_output   A bool. If true, returns the hash of the cross instead of the string. This will allow us avoiding string manipulations.  
  num_buckets   An int that is >= 0. It is used if hashed_output is true. output = hashed_value%num_buckets if num_buckets > 0 else hashed_value.  
  hash_key   An int. Specify the hash_key that will be used by the FingerprintCat64 function to combine the crosses fingerprints.  
  out_type   A tf.DType from: tf.int64, tf.string.  
  internal_type   A tf.DType from: tf.int64, tf.string.  
  name   A name for the operation (optional).   
 


 Returns   A tuple of Tensor objects (output_indices, output_values, output_shape).     output_indices   A Tensor of type int64.  
  output_values   A Tensor of type out_type.  
  output_shape   A Tensor of type int64.
tf.raw_ops.SparseCrossHashed Generates sparse cross from a list of sparse and dense tensors.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.raw_ops.SparseCrossHashed  
tf.raw_ops.SparseCrossHashed(
    indices, values, shapes, dense_inputs, num_buckets, strong_hash, salt, name=None
)
 The op takes two lists, one of 2D SparseTensor and one of 2D Tensor, each representing features of one feature column. It outputs a 2D SparseTensor with the batchwise crosses of these features. For example, if the inputs are inputs[0]: SparseTensor with shape = [2, 2]
[0, 0]: "a"
[1, 0]: "b"
[1, 1]: "c"

inputs[1]: SparseTensor with shape = [2, 1]
[0, 0]: "d"
[1, 0]: "e"

inputs[2]: Tensor [["f"], ["g"]]
 then the output will be shape = [2, 2]
[0, 0]: "a_X_d_X_f"
[1, 0]: "b_X_e_X_g"
[1, 1]: "c_X_e_X_g"
 if hashed_output=true then the output will be shape = [2, 2]
[0, 0]: FingerprintCat64(
            Fingerprint64("f"), FingerprintCat64(
                Fingerprint64("d"), Fingerprint64("a")))
[1, 0]: FingerprintCat64(
            Fingerprint64("g"), FingerprintCat64(
                Fingerprint64("e"), Fingerprint64("b")))
[1, 1]: FingerprintCat64(
            Fingerprint64("g"), FingerprintCat64(
                Fingerprint64("e"), Fingerprint64("c")))

 


 Args
  indices   A list of Tensor objects with type int64. 2-D. Indices of each input SparseTensor.  
  values   A list of Tensor objects with types from: int64, string. 1-D. values of each SparseTensor.  
  shapes   A list with the same length as indices of Tensor objects with type int64. 1-D. Shapes of each SparseTensor.  
  dense_inputs   A list of Tensor objects with types from: int64, string. 2-D. Columns represented by dense Tensor.  
  num_buckets   A Tensor of type int64. It is used if hashed_output is true. output = hashed_value%num_buckets if num_buckets > 0 else hashed_value.  
  strong_hash   A Tensor of type bool. boolean, if true, siphash with salt will be used instead of farmhash.  
  salt   A Tensor of type int64. Specify the salt that will be used by the siphash function.  
  name   A name for the operation (optional).   
 


 Returns   A tuple of Tensor objects (output_indices, output_values, output_shape).     output_indices   A Tensor of type int64.  
  output_values   A Tensor of type int64.  
  output_shape   A Tensor of type int64.
tf.raw_ops.SparseCrossV2 Generates sparse cross from a list of sparse and dense tensors.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.raw_ops.SparseCrossV2  
tf.raw_ops.SparseCrossV2(
    indices, values, shapes, dense_inputs, sep, name=None
)
 The op takes two lists, one of 2D SparseTensor and one of 2D Tensor, each representing features of one feature column. It outputs a 2D SparseTensor with the batchwise crosses of these features. For example, if the inputs are inputs[0]: SparseTensor with shape = [2, 2]
[0, 0]: "a"
[1, 0]: "b"
[1, 1]: "c"

inputs[1]: SparseTensor with shape = [2, 1]
[0, 0]: "d"
[1, 0]: "e"

inputs[2]: Tensor [["f"], ["g"]]
 then the output will be shape = [2, 2]
[0, 0]: "a_X_d_X_f"
[1, 0]: "b_X_e_X_g"
[1, 1]: "c_X_e_X_g"
 if hashed_output=true then the output will be shape = [2, 2]
[0, 0]: FingerprintCat64(
            Fingerprint64("f"), FingerprintCat64(
                Fingerprint64("d"), Fingerprint64("a")))
[1, 0]: FingerprintCat64(
            Fingerprint64("g"), FingerprintCat64(
                Fingerprint64("e"), Fingerprint64("b")))
[1, 1]: FingerprintCat64(
            Fingerprint64("g"), FingerprintCat64(
                Fingerprint64("e"), Fingerprint64("c")))

 


 Args
  indices   A list of Tensor objects with type int64. 2-D. Indices of each input SparseTensor.  
  values   A list of Tensor objects with types from: int64, string. 1-D. values of each SparseTensor.  
  shapes   A list with the same length as indices of Tensor objects with type int64. 1-D. Shapes of each SparseTensor.  
  dense_inputs   A list of Tensor objects with types from: int64, string. 2-D. Columns represented by dense Tensor.  
  sep   A Tensor of type string. string used when joining a list of string inputs, can be used as separator later.  
  name   A name for the operation (optional).   
 


 Returns   A tuple of Tensor objects (output_indices, output_values, output_shape).     output_indices   A Tensor of type int64.  
  output_values   A Tensor of type string.  
  output_shape   A Tensor of type int64.