neulab/docprompting-conala huggingface dataset:
tf.raw_ops.SparseDenseCwiseAdd Adds up a SparseTensor and a dense Tensor, using these special rules:  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.raw_ops.SparseDenseCwiseAdd  
tf.raw_ops.SparseDenseCwiseAdd(
    sp_indices, sp_values, sp_shape, dense, name=None
)
 (1) Broadcasts the dense side to have the same shape as the sparse side, if eligible; (2) Then, only the dense values pointed to by the indices of the SparseTensor participate in the cwise addition. By these rules, the result is a logical SparseTensor with exactly the same indices and shape, but possibly with different non-zero values. The output of this Op is the resultant non-zero values.
 


 Args
  sp_indices   A Tensor of type int64. 2-D. N x R matrix with the indices of non-empty values in a SparseTensor, possibly not in canonical ordering.  
  sp_values   A Tensor. Must be one of the following types: float32, float64, int32, uint8, int16, int8, complex64, int64, qint8, quint8, qint32, bfloat16, uint16, complex128, half, uint32, uint64. 1-D. N non-empty values corresponding to sp_indices.  
  sp_shape   A Tensor of type int64. 1-D. Shape of the input SparseTensor.  
  dense   A Tensor. Must have the same type as sp_values. R-D. The dense Tensor operand.  
  name   A name for the operation (optional).   
 


 Returns   A Tensor. Has the same type as sp_values.
tf.raw_ops.SparseDenseCwiseDiv Component-wise divides a SparseTensor by a dense Tensor.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.raw_ops.SparseDenseCwiseDiv  
tf.raw_ops.SparseDenseCwiseDiv(
    sp_indices, sp_values, sp_shape, dense, name=None
)
 Limitation: this Op only broadcasts the dense side to the sparse side, but not the other direction.
 


 Args
  sp_indices   A Tensor of type int64. 2-D. N x R matrix with the indices of non-empty values in a SparseTensor, possibly not in canonical ordering.  
  sp_values   A Tensor. Must be one of the following types: float32, float64, int32, uint8, int16, int8, complex64, int64, qint8, quint8, qint32, bfloat16, uint16, complex128, half, uint32, uint64. 1-D. N non-empty values corresponding to sp_indices.  
  sp_shape   A Tensor of type int64. 1-D. Shape of the input SparseTensor.  
  dense   A Tensor. Must have the same type as sp_values. R-D. The dense Tensor operand.  
  name   A name for the operation (optional).   
 


 Returns   A Tensor. Has the same type as sp_values.
tf.raw_ops.SparseDenseCwiseMul Component-wise multiplies a SparseTensor by a dense Tensor.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.raw_ops.SparseDenseCwiseMul  
tf.raw_ops.SparseDenseCwiseMul(
    sp_indices, sp_values, sp_shape, dense, name=None
)
 The output locations corresponding to the implicitly zero elements in the sparse tensor will be zero (i.e., will not take up storage space), regardless of the contents of the dense tensor (even if it's +/-INF and that INF*0 == NaN). Limitation: this Op only broadcasts the dense side to the sparse side, but not the other direction.
 


 Args
  sp_indices   A Tensor of type int64. 2-D. N x R matrix with the indices of non-empty values in a SparseTensor, possibly not in canonical ordering.  
  sp_values   A Tensor. Must be one of the following types: float32, float64, int32, uint8, int16, int8, complex64, int64, qint8, quint8, qint32, bfloat16, uint16, complex128, half, uint32, uint64. 1-D. N non-empty values corresponding to sp_indices.  
  sp_shape   A Tensor of type int64. 1-D. Shape of the input SparseTensor.  
  dense   A Tensor. Must have the same type as sp_values. R-D. The dense Tensor operand.  
  name   A name for the operation (optional).   
 


 Returns   A Tensor. Has the same type as sp_values.
tf.raw_ops.SparseFillEmptyRows Fills empty rows in the input 2-D SparseTensor with a default value.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.raw_ops.SparseFillEmptyRows  
tf.raw_ops.SparseFillEmptyRows(
    indices, values, dense_shape, default_value, name=None
)
 The input SparseTensor is represented via the tuple of inputs (indices, values, dense_shape). The output SparseTensor has the same dense_shape but with indices output_indices and values output_values. This op inserts a single entry for every row that doesn't have any values. The index is created as [row, 0, ..., 0] and the inserted value is default_value. For example, suppose sp_input has shape [5, 6] and non-empty values: [0, 1]: a
[0, 3]: b
[2, 0]: c
[3, 1]: d
 Rows 1 and 4 are empty, so the output will be of shape [5, 6] with values: [0, 1]: a
[0, 3]: b
[1, 0]: default_value
[2, 0]: c
[3, 1]: d
[4, 0]: default_value
 The output SparseTensor will be in row-major order and will have the same shape as the input. This op also returns an indicator vector shaped [dense_shape[0]] such that empty_row_indicator[i] = True iff row i was an empty row.
 And a reverse index map vector shaped [indices.shape[0]] that is used during backpropagation, reverse_index_map[j] = out_j s.t. indices[j, :] == output_indices[out_j, :]

 


 Args
  indices   A Tensor of type int64. 2-D. the indices of the sparse tensor.  
  values   A Tensor. 1-D. the values of the sparse tensor.  
  dense_shape   A Tensor of type int64. 1-D. the shape of the sparse tensor.  
  default_value   A Tensor. Must have the same type as values. 0-D. default value to insert into location [row, 0, ..., 0] for rows missing from the input sparse tensor. output indices: 2-D. the indices of the filled sparse tensor.  
  name   A name for the operation (optional).   
 


 Returns   A tuple of Tensor objects (output_indices, output_values, empty_row_indicator, reverse_index_map).     output_indices   A Tensor of type int64.  
  output_values   A Tensor. Has the same type as values.  
  empty_row_indicator   A Tensor of type bool.  
  reverse_index_map   A Tensor of type int64.
tf.raw_ops.SparseFillEmptyRowsGrad The gradient of SparseFillEmptyRows.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.raw_ops.SparseFillEmptyRowsGrad  
tf.raw_ops.SparseFillEmptyRowsGrad(
    reverse_index_map, grad_values, name=None
)
 Takes vectors reverse_index_map, shaped [N], and grad_values, shaped [N_full], where N_full >= N and copies data into either d_values or d_default_value. Here d_values is shaped [N] and d_default_value is a scalar. d_values[j] = grad_values[reverse_index_map[j]] d_defaultvalue = sum{k : 0 .. N_full - 1} ( grad_values[k] * 1{k not in reverse_index_map})
 


 Args
  reverse_index_map   A Tensor of type int64. 1-D. The reverse index map from SparseFillEmptyRows.  
  grad_values   A Tensor. 1-D. The gradients from backprop.  
  name   A name for the operation (optional).   
 


 Returns   A tuple of Tensor objects (d_values, d_default_value).     d_values   A Tensor. Has the same type as grad_values.  
  d_default_value   A Tensor. Has the same type as grad_values.
tf.raw_ops.SparseMatMul Multiply matrix "a" by matrix "b".  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.raw_ops.SparseMatMul  
tf.raw_ops.SparseMatMul(
    a, b, transpose_a=False, transpose_b=False, a_is_sparse=False,
    b_is_sparse=False, name=None
)
 The inputs must be two-dimensional matrices and the inner dimension of "a" must match the outer dimension of "b". Both "a" and "b" must be Tensors not SparseTensors. This op is optimized for the case where at least one of "a" or "b" is sparse, in the sense that they have a large proportion of zero values. The breakeven for using this versus a dense matrix multiply on one platform was 30% zero values in the sparse matrix. The gradient computation of this operation will only take advantage of sparsity in the input gradient when that gradient comes from a Relu.
 


 Args
  a   A Tensor. Must be one of the following types: float32, bfloat16.  
  b   A Tensor. Must be one of the following types: float32, bfloat16.  
  transpose_a   An optional bool. Defaults to False.  
  transpose_b   An optional bool. Defaults to False.  
  a_is_sparse   An optional bool. Defaults to False.  
  b_is_sparse   An optional bool. Defaults to False.  
  name   A name for the operation (optional).   
 


 Returns   A Tensor of type float32.
tf.raw_ops.SparseMatrixAdd Sparse addition of two CSR matrices, C = alpha * A + beta * B.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.raw_ops.SparseMatrixAdd  
tf.raw_ops.SparseMatrixAdd(
    a, b, alpha, beta, name=None
)
 The gradients of SparseMatrixAdd outputs with respect to alpha and beta are not currently defined (TensorFlow will return zeros for these entries).
 


 Args
  a   A Tensor of type variant. A CSRSparseMatrix.  
  b   A Tensor of type variant. A CSRSparseMatrix.  
  alpha   A Tensor. Must be one of the following types: float32, float64, complex64, complex128. A constant scalar.  
  beta   A Tensor. Must have the same type as alpha. A constant scalar.  
  name   A name for the operation (optional).   
 


 Returns   A Tensor of type variant.
tf.raw_ops.SparseMatrixMatMul Matrix-multiplies a sparse matrix with a dense matrix.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.raw_ops.SparseMatrixMatMul  
tf.raw_ops.SparseMatrixMatMul(
    a, b, transpose_a=False, transpose_b=False, adjoint_a=False, adjoint_b=False,
    transpose_output=False, conjugate_output=False, name=None
)
 Returns a dense matrix. For inputs A and B, where A is CSR and B is dense; this op returns a dense C; If transpose_output is false, returns: C = A . B
 If transpose_output is true, returns: C = transpose(A . B) = transpose(B) . transpose(A)
 where the transposition is performed along the two innermost (matrix) dimensions. If conjugate_output is true, returns: C = conjugate(A . B) = conjugate(A) . conjugate(B)
 If both conjugate_output and transpose_output are true, returns: C = conjugate(transpose(A . B)) = conjugate(transpose(B)) .
                                  conjugate(transpose(A))

 


 Args
  a   A Tensor of type variant. A CSRSparseMatrix.  
  b   A Tensor. A dense tensor.  
  transpose_a   An optional bool. Defaults to False. Indicates whether a should be transposed.  
  transpose_b   An optional bool. Defaults to False. Indicates whether b should be transposed.  
  adjoint_a   An optional bool. Defaults to False. Indicates whether a should be conjugate-transposed.  
  adjoint_b   An optional bool. Defaults to False. Indicates whether b should be conjugate-transposed.  
  transpose_output   An optional bool. Defaults to False. Transposes the product of a and b.  
  conjugate_output   An optional bool. Defaults to False. Conjugates the product of a and b.  
  name   A name for the operation (optional).   
 


 Returns   A Tensor. Has the same type as b.
tf.raw_ops.SparseMatrixMul Element-wise multiplication of a sparse matrix with a dense tensor.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.raw_ops.SparseMatrixMul  
tf.raw_ops.SparseMatrixMul(
    a, b, name=None
)
 Returns a sparse matrix. The dense tensor b may be either a scalar; otherwise a must be a rank-3 SparseMatrix; in this case b must be shaped [batch_size, 1, 1] and the multiply operation broadcasts. 
Note: even if b is zero, the sparsity structure of the output does not change.

 


 Args
  a   A Tensor of type variant. A CSRSparseMatrix.  
  b   A Tensor. A dense tensor.  
  name   A name for the operation (optional).   
 


 Returns   A Tensor of type variant.
tf.raw_ops.SparseMatrixNNZ Returns the number of nonzeroes of sparse_matrix.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.raw_ops.SparseMatrixNNZ  
tf.raw_ops.SparseMatrixNNZ(
    sparse_matrix, name=None
)

 


 Args
  sparse_matrix   A Tensor of type variant. A CSRSparseMatrix.  
  name   A name for the operation (optional).   
 


 Returns   A Tensor of type int32.
tf.raw_ops.SparseMatrixOrderingAMD Computes the Approximate Minimum Degree (AMD) ordering of input.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.raw_ops.SparseMatrixOrderingAMD  
tf.raw_ops.SparseMatrixOrderingAMD(
    input, name=None
)
 Computes the Approximate Minimum Degree (AMD) ordering for a sparse matrix. The returned permutation may be used to permute the rows and columns of the given sparse matrix. This typically results in permuted sparse matrix's sparse Cholesky (or other decompositions) in having fewer zero fill-in compared to decomposition of the original matrix. The input sparse matrix may have rank 2 or rank 3. The output Tensor, representing would then have rank 1 or 2 respectively, with the same batch shape as the input. Each component of the input sparse matrix must represent a square symmetric matrix; only the lower triangular part of the matrix is read. The values of the sparse matrix does not affect the returned permutation, only the sparsity pattern of the sparse matrix is used. Hence, a single AMD ordering may be reused for the Cholesky decompositions of sparse matrices with the same sparsity pattern but with possibly different values. Each batch component of the output permutation represents a permutation of N elements, where the input sparse matrix components each have N rows. That is, the component contains each of the integers {0, .. N-1} exactly once. The ith element represents the row index that the ith row maps to. Usage example: from tensorflow.python.ops.linalg.sparse import sparse_csr_matrix_ops

a_indices = np.array([[0, 0], [1, 1], [2, 1], [2, 2], [3, 3]])
a_values = np.array([1.0, 2.0, 1.0, 3.0, 4.0], np.float32)
a_dense_shape = [4, 4]

with tf.Session() as sess:
  # Define (COO format) SparseTensor over Numpy array.
  a_st = tf.sparse.SparseTensor(a_indices, a_values, a_dense_shape)

  # Convert SparseTensors to CSR SparseMatrix.
  a_sm = sparse_csr_matrix_ops.sparse_tensor_to_csr_sparse_matrix(
      a_st.indices, a_st.values, a_st.dense_shape)

  # Obtain the AMD Ordering for the CSR SparseMatrix.
  ordering_amd = sparse_csr_matrix_ops.sparse_matrix_ordering_amd(sparse_matrix)

  ordering_amd_value = sess.run(ordering_amd)
 ordering_amd_value stores the AMD ordering: [1 2 3 0]. input: A CSRSparseMatrix.
 


 Args
  input   A Tensor of type variant. A CSRSparseMatrix.  
  name   A name for the operation (optional).   
 


 Returns   A Tensor of type int32.
tf.raw_ops.SparseMatrixSoftmax Calculates the softmax of a CSRSparseMatrix.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.raw_ops.SparseMatrixSoftmax  
tf.raw_ops.SparseMatrixSoftmax(
    logits, type, name=None
)
 Calculate the softmax of the innermost dimensions of a SparseMatrix. Missing values are treated as -inf (i.e., logits of zero probability); and the output has the same sparsity structure as the input (though missing values in the output may now be treated as having probability zero).
 


 Args
  logits   A Tensor of type variant. A CSRSparseMatrix.  
  type   A tf.DType from: tf.float32, tf.float64.  
  name   A name for the operation (optional).   
 


 Returns   A Tensor of type variant.
tf.raw_ops.SparseMatrixSoftmaxGrad Calculates the gradient of the SparseMatrixSoftmax op.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.raw_ops.SparseMatrixSoftmaxGrad  
tf.raw_ops.SparseMatrixSoftmaxGrad(
    softmax, grad_softmax, type, name=None
)

 


 Args
  softmax   A Tensor of type variant. A CSRSparseMatrix.  
  grad_softmax   A Tensor of type variant. The gradient of softmax.  
  type   A tf.DType from: tf.float32, tf.float64.  
  name   A name for the operation (optional).   
 


 Returns   A Tensor of type variant.
tf.raw_ops.SparseMatrixTranspose Transposes the inner (matrix) dimensions of a CSRSparseMatrix.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.raw_ops.SparseMatrixTranspose  
tf.raw_ops.SparseMatrixTranspose(
    input, type, conjugate=False, name=None
)
 Transposes the inner (matrix) dimensions of a SparseMatrix and optionally conjugates its values.
 


 Args
  input   A Tensor of type variant. A CSRSparseMatrix.  
  type   A tf.DType from: tf.float32, tf.float64, tf.complex64, tf.complex128.  
  conjugate   An optional bool. Defaults to False. Indicates whether input should be conjugated.  
  name   A name for the operation (optional).   
 


 Returns   A Tensor of type variant.
tf.raw_ops.SparseMatrixZeros Creates an all-zeros CSRSparseMatrix with shape dense_shape.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.raw_ops.SparseMatrixZeros  
tf.raw_ops.SparseMatrixZeros(
    dense_shape, type, name=None
)

 


 Args
  dense_shape   A Tensor of type int64. The desired matrix shape.  
  type   A tf.DType from: tf.float32, tf.float64, tf.complex64, tf.complex128.  
  name   A name for the operation (optional).   
 


 Returns   A Tensor of type variant.
tf.raw_ops.SparseReduceMax Computes the max of elements across dimensions of a SparseTensor.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.raw_ops.SparseReduceMax  
tf.raw_ops.SparseReduceMax(
    input_indices, input_values, input_shape, reduction_axes, keep_dims=False,
    name=None
)
 This Op takes a SparseTensor and is the sparse counterpart to tf.reduce_max(). In particular, this Op also returns a dense Tensor instead of a sparse one. Reduces sp_input along the dimensions given in reduction_axes. Unless keep_dims is true, the rank of the tensor is reduced by 1 for each entry in reduction_axes. If keep_dims is true, the reduced dimensions are retained with length 1. If reduction_axes has no entries, all dimensions are reduced, and a tensor with a single element is returned. Additionally, the axes can be negative, which are interpreted according to the indexing rules in Python.
 


 Args
  input_indices   A Tensor of type int64. 2-D. N x R matrix with the indices of non-empty values in a SparseTensor, possibly not in canonical ordering.  
  input_values   A Tensor. Must be one of the following types: float32, float64, int32, uint8, int16, int8, int64, bfloat16, uint16, half, uint32, uint64. 1-D. N non-empty values corresponding to input_indices.  
  input_shape   A Tensor of type int64. 1-D. Shape of the input SparseTensor.  
  reduction_axes   A Tensor of type int32. 1-D. Length-K vector containing the reduction axes.  
  keep_dims   An optional bool. Defaults to False. If true, retain reduced dimensions with length 1.  
  name   A name for the operation (optional).   
 


 Returns   A Tensor. Has the same type as input_values.
tf.raw_ops.SparseReduceMaxSparse Computes the max of elements across dimensions of a SparseTensor.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.raw_ops.SparseReduceMaxSparse  
tf.raw_ops.SparseReduceMaxSparse(
    input_indices, input_values, input_shape, reduction_axes, keep_dims=False,
    name=None
)
 This Op takes a SparseTensor and is the sparse counterpart to tf.reduce_max(). In contrast to SparseReduceMax, this Op returns a SparseTensor. Reduces sp_input along the dimensions given in reduction_axes. Unless keep_dims is true, the rank of the tensor is reduced by 1 for each entry in reduction_axes. If keep_dims is true, the reduced dimensions are retained with length 1. If reduction_axes has no entries, all dimensions are reduced, and a tensor with a single element is returned. Additionally, the axes can be negative, which are interpreted according to the indexing rules in Python.
 


 Args
  input_indices   A Tensor of type int64. 2-D. N x R matrix with the indices of non-empty values in a SparseTensor, possibly not in canonical ordering.  
  input_values   A Tensor. Must be one of the following types: float32, float64, int32, uint8, int16, int8, int64, bfloat16, uint16, half, uint32, uint64. 1-D. N non-empty values corresponding to input_indices.  
  input_shape   A Tensor of type int64. 1-D. Shape of the input SparseTensor.  
  reduction_axes   A Tensor of type int32. 1-D. Length-K vector containing the reduction axes.  
  keep_dims   An optional bool. Defaults to False. If true, retain reduced dimensions with length 1.  
  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 input_values.  
  output_shape   A Tensor of type int64.
tf.raw_ops.SparseReduceSum Computes the sum of elements across dimensions of a SparseTensor.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.raw_ops.SparseReduceSum  
tf.raw_ops.SparseReduceSum(
    input_indices, input_values, input_shape, reduction_axes, keep_dims=False,
    name=None
)
 This Op takes a SparseTensor and is the sparse counterpart to tf.reduce_sum(). In particular, this Op also returns a dense Tensor instead of a sparse one. Reduces sp_input along the dimensions given in reduction_axes. Unless keep_dims is true, the rank of the tensor is reduced by 1 for each entry in reduction_axes. If keep_dims is true, the reduced dimensions are retained with length 1. If reduction_axes has no entries, all dimensions are reduced, and a tensor with a single element is returned. Additionally, the axes can be negative, which are interpreted according to the indexing rules in Python.
 


 Args
  input_indices   A Tensor of type int64. 2-D. N x R matrix with the indices of non-empty values in a SparseTensor, possibly not in canonical ordering.  
  input_values   A Tensor. Must be one of the following types: float32, float64, int32, uint8, int16, int8, complex64, int64, qint8, quint8, qint32, bfloat16, uint16, complex128, half, uint32, uint64. 1-D. N non-empty values corresponding to input_indices.  
  input_shape   A Tensor of type int64. 1-D. Shape of the input SparseTensor.  
  reduction_axes   A Tensor of type int32. 1-D. Length-K vector containing the reduction axes.  
  keep_dims   An optional bool. Defaults to False. If true, retain reduced dimensions with length 1.  
  name   A name for the operation (optional).   
 


 Returns   A Tensor. Has the same type as input_values.