mindspore.ops
Neural Network Layer Functions
Neural Network
API Name |
Description |
Supported Platforms |
This operator applies a 2D adaptive average pooling to an input signal composed of multiple input planes. |
|
|
This operator applies a 3D adaptive average pooling to an input signal composed of multiple input planes. |
|
|
This operator applies a 2D adaptive max pooling to an input signal composed of multiple input planes. |
|
|
Applies a 3D adaptive max pooling over an input signal composed of several input planes. |
|
|
Applies a 2D average pooling over an input Tensor which can be regarded as a composition of 2D input planes. |
|
|
Applies a 3D average pooling over an input Tensor which can be regarded as a composition of 3D input planes. |
|
|
Batch Normalization for input data and updated parameters. |
|
|
Returns the sum of the input_x and the bias Tensor. |
|
|
Applies a 2D convolution over an input tensor. |
|
|
Applies a 3D convolution over an input tensor. |
|
|
Performs greedy decoding on the logits given in inputs. |
|
|
Given 4D tensor inputs x, weight and offsets, compute a 2D deformable convolution. |
|
|
During training, randomly zeroes some of the elements of the input tensor with probability p from a Bernoulli distribution. |
|
|
During training, randomly zeroes some channels of the input tensor with probability p from a Bernoulli distribution(For a 3-dimensional tensor with a shape of \(NCL\), the channel feature map refers to a 1-dimensional feature map with the shape of \(L\)). |
|
|
During training, randomly zeroes some channels of the input tensor with probability p from a Bernoulli distribution(For a 4-dimensional tensor with a shape of \(NCHW\), the channel feature map refers to a 2-dimensional feature map with the shape of \(HW\)). |
|
|
During training, randomly zeroes some channels of the input tensor with probability p from a Bernoulli distribution(For a 5-dimensional tensor with a shape of \(NCDHW\), the channel feature map refers to a 3-dimensional feature map with a shape of \(DHW\)). |
|
|
Flattens a tensor without changing its batch size on the 0-th axis. |
|
|
Extracts sliding local blocks from a batched input tensor. |
|
|
Combines an array of sliding local blocks into a large containing tensor. |
|
|
Applies a 2D fractional max pooling to an input signal. |
|
|
This operator applies a 3D fractional max pooling over an input signal. |
|
|
Using the interpolate method specified by mode resize the input tensor x. |
|
|
Applies a 1D power lp pooling over an input signal composed of several input planes. |
|
|
Applies a 2D power lp pooling over an input signal composed of several input planes. |
|
|
Local Response Normalization. |
|
|
Performs a 3D max pooling on the input Tensor. |
|
|
Computes a partial inverse of maxpool1d. |
|
|
Computes a partial inverse of maxpool2d. |
|
|
Computes a partial inverse of maxpool3d. |
|
Loss Functions
API Name |
Description |
Supported Platforms |
Computes the binary cross entropy between predictive value logits and target value labels. |
|
|
Adds sigmoid activation function to input logits, and uses the given logits to compute binary cross entropy between the logits and the label. |
|
|
The cross entropy loss between input and target. |
|
|
Gaussian negative log likelihood loss. |
|
|
Hinge Embedding Loss. |
|
|
Computes the Kullback-Leibler divergence between the logits and the labels. |
|
|
MarginRankingLoss creates a criterion that measures the loss. |
|
|
Hinge loss for optimizing a multi-label classification. |
|
|
Gets the negative log likelihood loss between inputs and target. |
|
|
Computes smooth L1 loss, a robust L1 loss. |
|
Activation Functions
API Name |
Description |
Supported Platforms |
Exponential Linear Unit activation function. |
|
|
Fast Gaussian Error Linear Units activation function. |
|
|
Gaussian Error Linear Units activation function. |
|
|
Computes GLU (Gated Linear Unit activation function) of input tensors . |
|
|
Returns the samples from the Gumbel-Softmax distribution and optionally discretizes. |
|
|
Hard Shrink activation function. |
|
|
Applies hswish-type activation element-wise. |
|
|
Applies the Log Softmax function to the input tensor on the specified axis. |
|
|
Computes MISH(A Self Regularized Non-Monotonic Neural Activation Function) of input tensors element-wise. |
|
|
Parametric Rectified Linear Unit activation function. |
|
|
Computes ReLU (Rectified Linear Unit activation function) of input tensors element-wise. |
|
|
Computes ReLU (Rectified Linear Unit) upper bounded by 6 of input tensors element-wise. |
|
|
Activation function SeLU (Scaled exponential Linear Unit). |
|
|
Computes Sigmoid of input element-wise. |
|
|
Softsign activation function. |
|
|
Applies the SoftShrink function element-wise. |
|
|
Applies the Softmax operation to the input tensor on the specified axis. |
|
|
Computes hyperbolic tangent of input element-wise. |
|
Sampling Functions
API Name |
Description |
Supported Platforms |
Generates a random sample as index tensor with a mask tensor from a given tensor. |
|
|
Generates random samples from a given categorical distribution tensor. |
|
|
Generates random labels with a log-uniform distribution for sampled_candidates. |
|
|
Uniform candidate sampler. |
|
Distance Functions
API Name |
Description |
Supported Platforms |
Computes p-norm distance between each pair of row vectors of two input Tensors. |
|
|
Computes the p-norm distance between each pair of row vectors in the input. |
|
Element-by-Element Operations
API Name |
Description |
Supported Platforms |
Returns absolute value of a tensor element-wise. |
|
|
Alias for |
|
|
Computes accumulation of all input tensors element-wise. |
|
|
Computes arccosine of input tensors element-wise. |
|
|
Computes inverse hyperbolic cosine of the inputs element-wise. |
|
|
Adds two input tensors element-wise. |
|
|
Performs the element-wise division of tensor x1 by tensor x2, multiply the result by the scalar value and add it to input_data. |
|
|
Performs the element-wise product of tensor x1 and tensor x2, multiply the result by the scalar value and add it to input_data. |
|
|
Computes addition of all input tensors element-wise. |
|
|
Executes the outer-product of vec1 and vec2 and adds it to the matrix x. |
|
|
Returns the element-wise argument of a complex tensor. |
|
|
Alias for |
|
|
For details, please refer to |
|
|
For details, please refer to |
|
|
For details, please refer to |
|
|
For details, please refer to |
|
|
Computes arcsine of input tensors element-wise. |
|
|
Computes inverse hyperbolic sine of the input element-wise. |
|
|
Computes the trigonometric inverse tangent of the input element-wise. |
|
|
Returns arctangent of x/y element-wise. |
|
|
Computes inverse hyperbolic tangent of the input element-wise. |
|
|
Computes the Bessel i0 function of x element-wise. |
|
|
Computes the Bessel i0e function of x element-wise. |
|
|
Computes the Bessel i1 function of x element-wise. |
|
|
Computes the Bessel i1e function of x element-wise. |
|
|
Computes the Bessel j0 function of x element-wise. |
|
|
Computes the Bessel j1 function of x element-wise. |
|
|
Computes the Bessel k0 function of x element-wise. |
|
|
Computes the Bessel k0e function of x element-wise. |
|
|
Computes the Bessel k1 function of x element-wise. |
|
|
Computes the Bessel k1e function of x element-wise. |
|
|
Computes the Bessel y0 function of x element-wise. |
|
|
Computes the Bessel y1 function of x element-wise. |
|
|
Returns bitwise and of two tensors element-wise. |
|
|
Returns bitwise or of two tensors element-wise. |
|
|
Returns bitwise xor of two tensors element-wise. |
|
|
Rounds a tensor up to the closest integer element-wise. |
|
|
Create a new floating-point tensor with the magnitude of x and the sign of other, element-wise. |
|
|
Computes cosine of input element-wise. |
|
|
Computes hyperbolic cosine of input element-wise. |
|
|
Calculates a new tensor with each of the elements of x converted from angles in degrees to radians. |
|
|
Divides the first input tensor by the second input tensor in floating-point type element-wise. |
|
|
Alias for |
|
|
Computes the Gauss error function of x element-wise. |
|
|
Computes the complementary error function of x element-wise. |
|
|
Computes the inverse error function of input. |
|
|
Returns exponential of a tensor element-wise. |
|
|
Returns exponential then minus 1 of a tensor element-wise. |
|
|
Rounds a tensor down to the closest integer element-wise. |
|
|
Divides the first input tensor by the second input tensor element-wise and round down to the closest integer. |
|
|
Computes the remainder of division element-wise. |
|
|
Computes the Heaviside step function for each element in input. |
|
|
Computes hypotenuse of input tensors element-wise as legs of a right triangle. |
|
|
Alias for |
|
|
Calculates lower regularized incomplete Gamma function. |
|
|
Calculates upper regularized incomplete Gamma function. |
|
|
Computes Reciprocal of input tensor element-wise. |
|
|
Flips all bits of input tensor element-wise. |
|
|
Computes least common multiplier of input tensors element-wise. |
|
|
Multiplies input by \(2^{other}\) . |
|
|
Does a linear interpolation of two tensors start and end based on a float or tensor weight. |
|
|
Returns the natural logarithm of a tensor element-wise. |
|
|
Returns a new tensor with the logarithm to the base 10 of the elements of input. |
|
|
Returns the natural logarithm of one plus the input tensor element-wise. |
|
|
Returns a new tensor with the logarithm to the base 2 of the elements of input. |
|
|
Computes the logarithm of the sum of exponentiations of the inputs. |
|
|
Computes the logarithm of the sum of exponentiations in base of 2 of the inputs. |
|
|
Computes the "logical AND" of two tensors element-wise. |
|
|
Computes the "logical NOT" of a tensor element-wise. |
|
|
Computes the "logical OR" of two tensors element-wise. |
|
|
Computes the "logical XOR" of two tensors element-wise. |
|
|
Calculate the logit of a tensor element-wise. |
|
|
Multiplies two tensors element-wise. |
|
|
Refer to |
|
|
Returns a tensor with negative values of the input tensor element-wise. |
|
|
Alias for |
|
|
Return self Tensor. |
|
|
Calculates the y power of each element in x. |
|
|
Returns a new tensor with each of the elements of x converted from angles in radians to degrees. |
|
|
Computes the remainder of dividing the first input tensor by the second input tensor element-wise. |
|
|
Rolls the elements of a tensor along an axis. |
|
|
Returns half to even of a tensor element-wise. |
|
|
Computes sine of the input element-wise. |
|
|
Computes hyperbolic sine of the input element-wise. |
|
|
Returns sqrt of a tensor element-wise. |
|
|
Returns square of a tensor element-wise. |
|
|
Subtracts the second input tensor from the first input tensor element-wise. |
|
|
Performs the element-wise subtraction of input tensors. |
|
|
Computes tangent of x element-wise. |
|
|
Alias for |
|
|
Returns a new tensor with the truncated integer values of the elements of the input tensor. |
|
|
Divides the first input tensor by the second input tensor element-wise for integer types, negative numbers will round fractional quantities towards zero. |
|
|
Returns the remainder of division element-wise. |
|
|
Divides the first input tensor by the second input tensor element-wise. |
|
|
Computes the first input tensor multiplied by the logarithm of second input tensor element-wise. |
|
Reduction Functions
API Name |
Description |
Supported Platforms |
Reduces all dimensions of a tensor by returning the maximum value in x, by default. |
|
|
Reduces all dimensions of a tensor by returning the minimum value in x, by default. |
|
|
Return the indices of the maximum values of a tensor across a dimension. |
|
|
Returns the indices of the minimum value of a tensor across the axis. |
|
|
Returns a tuple (values,indices) where 'values' is the cumulative maximum value of input Tensor x along the dimension axis, and indices is the index location of each maximum value. |
|
|
Returns a tuple (values,indices) where 'values' is the cumulative minimum value of input Tensor x along the dimension axis, and indices is the index location of each minimum value. |
|
|
Computes the cumulative sum of input Tensor along axis. |
|
|
Reduces a dimension of a tensor by calculating exponential for all elements in the dimension, then calculate logarithm of the sum. |
|
|
Calculates the maximum value along with the given axis for the input tensor. |
|
|
Reduces all dimension of a tensor by averaging all elements in the dimension, by default. |
|
|
Computes the median and indices of input tensor. |
|
|
Calculates the minimum value along with the given axis for the input tensor. |
|
|
Returns the matrix norm or vector norm of a given tensor. |
|
|
Reduces a dimension of a tensor by multiplying all elements in the dimension, by default. |
|
|
Returns the standard-deviation and mean of each row of the input tensor by default, or it can calculate them in specified dimension axis. |
|
Comparison Functions
API Name |
Description |
Supported Platforms |
Returns True if abs(x-y) is smaller than tolerance element-wise, otherwise False. |
|
|
Computes the equivalence between two tensors element-wise. |
|
|
Computes the boolean value of \(x >= y\) element-wise. |
|
|
Computes the boolean value of \(input > other\) element-wise. |
|
|
Computes the boolean value of \(input >= other\) element-wise. |
|
|
Compare the value of the input parameters \(x,y\) element-wise, and the output result is a bool value. |
|
|
Determines whether the targets are in the top k predictions. |
|
|
Returns a new Tensor with boolean elements representing if each element of x1 is “close” to the corresponding element of x2. |
|
|
Determines which elements are finite for each position. |
|
|
Determines which elements are inf or -inf for each position. |
|
|
Determines which elements are NaN for each position. |
|
|
Judge whether the data type of x is a floating point data type i.e., one of mindspore.flot64, mindspore.float32, mindspore.float16. |
|
|
Computes the boolean value of \(x <= y\) element-wise. |
|
|
Computes the boolean value of \(x < y\) element-wise. |
|
|
Computes the boolean value of \(input\_x <= other\) element-wise. |
|
|
Computes the maximum of input tensors element-wise. |
|
|
Computes the minimum of input tensors element-wise. |
|
|
Computes the non-equivalence of two tensors element-wise. |
|
|
Finds values and indices of the k largest entries along the last dimension. |
|
Linear Algebraic Functions
API Name |
Description |
Supported Platforms |
Applies batch matrix multiplication to batch1 and batch2, with a reduced add step. |
|
|
Multiplies matrix mat1 and matrix mat2. |
|
|
Returns a view of the tensor conjugated and with the last two dimensions transposed. |
|
|
Performs a batch matrix-matrix product of matrices in batch1 and batch2. |
|
|
Computes matrix multiplication between two tensors by batch. |
|
|
Computation of batch dot product between samples in two tensors containing batch dims. |
|
|
Computes the Cholesky decomposition of a symmetric positive-definite matrix \(A\) or for batches of symmetric positive-definite matrices. |
|
|
Returns the inverse of the positive definite matrix using cholesky matrix factorization. |
|
|
Returns the cross product of vectors in dimension dim of input input and other. |
|
|
Computation a dot product between samples in two tensors. |
|
|
Ger product of x1 and x2. |
|
|
Returns the matrix product of two tensors. |
|
|
Copy a tensor setting everything outside a central band in each innermost matrix to zero. |
|
|
Returns a Tensor with the contents in x as k[0]-th to k[1]-th diagonals of a matrix, with everything else padded with padding_value. |
|
|
Returns the diagonal part of input tensor. |
|
|
Computes the matrix exponential of a square matrix. |
|
|
Returns a batched matrix tensor with new batched diagonal values. |
|
|
Solves systems of linear equations. |
|
|
Computes the (Moore-Penrose) pseudo-inverse of a matrix. |
|
|
Renormalizes the sub-tensors along dimension dim, and each sub-tensor's p-norm should not exceed the 'maxnorm'. |
|
|
Computes the singular value decompositions of one or more matrices. |
|
|
Computation of Tensor contraction on arbitrary axes between tensors a and b. |
|
Spectral Functions
API Name |
Description |
Supported Platforms |
Bartlett window function. |
|
|
Blackman window function. |
|
Tensor Operation Functions
Tensor Building
API Name |
Description |
Supported Platforms |
Creates a tensor with ones on the diagonal and zeros in the rest. |
|
|
Create a Tensor of the specified shape and fill it with the specified value. |
|
|
Returns a Tensor whose value is num evenly spaced in the interval start and stop (including start and stop), and the length of the output Tensor is num. |
|
|
Computes a one-hot tensor. |
|
|
Creates a tensor filled with value ones. |
|
|
Returns a Tensor with a value of 1 and its shape and data type is the same as the input. |
|
|
Creates a sequence of numbers that begins at start and extends by increments of step up to but not including end. |
|
|
Creates a sequence of numbers that begins at start and extends by increments of delta up to but not including limit. |
|
Randomly Generating Functions
API Name |
Description |
Supported Platforms |
Randomly set the elements of output to 0 or 1 with the probability of P which follows the Bernoulli distribution. |
|
|
Generates random numbers according to the Gamma random number distribution. |
|
|
Generates random numbers according to the Laplace random number distribution. |
|
|
Returns a tensor sampled from the multinomial probability distribution located in the corresponding row of the input tensor. |
|
|
Generates random numbers according to the Normal (or Gaussian) random number distribution. |
|
|
Generates random number Tensor with shape shape according to a Poisson distribution with mean rate. |
|
|
Outputs random values from the Gamma distribution(s) described by alpha. |
|
|
Generates random numbers according to the Laplace random number distribution (mean=0, lambda=1). |
|
|
Generates random numbers according to the standard Normal (or Gaussian) random number distribution. |
|
|
Generates random numbers according to the Uniform random number distribution. |
|
Array Operation
API Name |
Description |
Supported Platforms |
Divides batch dimension with blocks and interleaves these blocks back into spatial dimensions. |
|
|
Broadcasts input tensor to a given shape. |
|
|
Combines an array of sliding local blocks into a large containing tensor. |
|
|
Connect input tensors along with the given axis. |
|
|
Returns a tensor of complex numbers that are the complex conjugate of each element in input. |
|
|
Count number of nonzero elements across axis of input tensor |
|
|
Constructs a diagonal tensor with a given diagonal values. |
|
|
Returns specified diagonals of input. |
|
|
Returns a new view of the self tensor with singleton dimensions expanded to a larger size. |
|
|
Adds an additional dimension to input_x at the given axis. |
|
|
Reverses the order of elements in a tensor along the given axis. |
|
|
Flips the entries in each row in the left/right direction. |
|
|
Flips the entries in each column in the up/down direction. |
|
|
Returns the slice of the input tensor corresponding to the elements of input_indices on the specified axis. |
|
|
Gathers elements along an axis specified by dim. |
|
|
Gathers elements along an axis specified by dim. |
|
|
Gathers slices from a tensor by indices. |
|
|
Adds tensor y to specified axis and indices of Parameter x. |
|
|
Fills the elements under the dim dimension of the input Tensor x with the input value by selecting the indices in the order given in index. |
|
|
Adds v into specified rows of x. |
|
|
Subtracts v into specified rows of x. |
|
|
Updates specified rows with values in v. |
|
|
Fills elements of Tensor with value where mask is True. |
|
|
Returns a new 1-D Tensor which indexes the x tensor according to the boolean mask. |
|
|
Generates coordinate matrices from given coordinate tensors. |
|
|
Returns a narrowed tensor from input tensor, and the dimension axis is input from start to start + length. |
|
|
Return a Tensor of the positions of all non-zero values. |
|
|
Returns a Scalar of type int that represents the total number of elements in the Tensor. |
|
|
Permutes the dimensions of the input tensor according to input dims . |
|
|
Computes element-wise population count(a.k.a bitsum, bitcount). |
|
|
Returns the rank of a tensor. |
|
|
Repeat elements of a tensor along an axis, like np.repeat . |
|
|
Repeat elements of a tensor along an axis, like numpy.repeat. |
|
|
Rearranges the input Tensor based on the given shape. |
|
|
Reverses specific dimensions of a tensor. |
|
|
Reverses variable length slices. |
|
|
Scatters a tensor into a new tensor depending on the specified indices. |
|
|
The conditional tensor determines whether the corresponding element in the output must be selected from \(x\) (if true) or \(y\) (if false) based on the value of each element. |
|
|
Returns a mask tensor representing the first N positions of each cell. |
|
|
Returns the shape of the input tensor. |
|
|
Randomly shuffles a Tensor along its first dimension. |
|
|
Returns a Scalar of type int that represents the size of the input Tensor and the total number of elements in the Tensor. |
|
|
Slices a tensor in the specified shape. |
|
|
Divides a tensor's spatial dimensions into blocks and combines the block sizes with the original batch. |
|
|
Computes a Tensor such that \(output_i = \frac{\sum_j x_{indices[j]}}{N}\) where mean is over \(j\) such that \(segment\_ids[j] == i\) and \(N\) is the total number of values summed. |
|
|
Splits the input tensor into output_num of tensors along the given axis and output numbers. |
|
|
Return the Tensor after deleting the dimension of size 1 in the specified axis. |
|
|
Stacks a list of tensors in specified axis. |
|
|
Extracts a strided slice of a Tensor based on begin/end index and strides. |
|
|
Creates a new tensor by adding the values from the positions in input_x indicated by indices, with values from updates. |
|
|
Creates a new tensor by dividing the values from the positions in input_x indicated by indices, with values from updates. |
|
|
By comparing the value at the position indicated by indices in input_x with the value in the updates, the value at the index will eventually be equal to the largest one to create a new tensor. |
|
|
By comparing the value at the position indicated by indices in input_x with the value in the updates, the value at the index will eventually be equal to the smallest one to create a new tensor. |
|
|
Creates a new tensor by multiplying the values from the positions in input_x indicated by indices, with values from updates. |
|
|
Creates a new tensor by subtracting the values from the positions in input_x indicated by indices, with values from updates. |
|
|
Updates the value of the input tensor through the reduction operation. |
|
|
Replicates an input tensor with given multiples times. |
|
|
Permutes the dimensions of the input tensor according to input permutation. |
|
|
Removes a tensor dimension in specified axis. |
|
|
Returns the unique elements of input tensor and also return a tensor containing the index of each value of input tensor corresponding to the output unique tensor. |
|
|
Returns the elements that are unique in each consecutive group of equivalent elements in the input tensor. |
|
|
Returns unique elements and relative indexes in 1-D tensor, filled with padding num. |
|
|
Computes the maximum along segments of a tensor. |
|
|
Computes the minimum of a tensor along segments. |
|
|
Computes the product of a tensor along segments. |
|
|
Computes the sum of a tensor along segments. |
|
|
Adds an additional dimension to input_x at the given dim. |
|
|
Unstacks tensor in specified axis. |
|
|
Computes the cumulative product of the input tensor along dimension dim. |
|
Type Conversion
API Name |
Description |
Supported Platforms |
Casts the input scalar to another type. |
|
|
Converts a scalar to a Tensor, and converts the data type to the specified type. |
|
|
Converts a tuple to a tensor. |
|
Sparse Functions
API Name |
Description |
Supported Platforms |
Convert a Tensor to COOTensor. |
|
|
Convert a Tensor to CSRTensor. |
|
|
Converts a CSRTensor to COOTensor. |
|
COO Functions
API Name |
Description |
Supported Platforms |
Returns coo_absolute value of a COOTensor element-wise. |
|
|
Computes arccosine of input coo_tensors element-wise. |
|
|
Computes inverse hyperbolic cosine of the inputs element-wise. |
|
|
Computes arcsine of input coo_tensors element-wise. |
|
|
Computes inverse hyperbolic sine of the input element-wise. |
|
|
Computes the trigonometric inverse tangent of the input element-wise. |
|
|
Computes inverse hyperbolic tangent of the input element-wise. |
|
|
Rounds a COOTensor up to the closest integer element-wise. |
|
|
Computes cosine of input element-wise. |
|
|
Computes hyperbolic cosine of input element-wise. |
|
|
Returns coo_exponential of a COOTensor element-wise. |
|
|
Returns exponential then minus 1 of a COOTensor element-wise. |
|
|
Rounds a COOTensor down to the closest integer element-wise. |
|
|
Computes Reciprocal of input COOTensor element-wise. |
|
|
Determines which elements are finite for each position. |
|
|
Determines which elements are inf or -inf for each position. |
|
|
Determines which elements are NaN for each position. |
|
|
Returns the natural logarithm of a COOTensor element-wise. |
|
|
Returns the natural logarithm of one plus the input COOTensor element-wise. |
|
|
Returns a COOTensor with coo_negative values of the input COOTensor element-wise. |
|
|
Computes ReLU (Rectified Linear Unit activation function) of input coo_tensors element-wise. |
|
|
Computes ReLU (Rectified Linear Unit) upper bounded by 6 of input coo_tensors element-wise. |
|
|
Returns half to even of a COOTensor element-wise. |
|
|
Sigmoid activation function. |
|
|
Computes sine of the input element-wise. |
|
|
Computes hyperbolic sine of the input element-wise. |
|
|
Softsign activation function. |
|
|
Returns sqrt of a COOTensor element-wise. |
|
|
Returns square of a COOTensor element-wise. |
|
|
Computes tangent of x element-wise. |
|
|
Computes hyperbolic tangent of input element-wise. |
|
|
Computes the sum of x1(COOTensor) and x2(COOTensor), and return a new COOTensor based on the computed result and thresh. |
|
CSR Functions
API Name |
Description |
Supported Platforms |
Returns csr_absolute value of a CSRTensor element-wise. |
|
|
Computes arccosine of input csr_tensors element-wise. |
|
|
Computes inverse hyperbolic cosine of the inputs element-wise. |
|
|
Returns alpha * csr_a + beta * csr_b where both csr_a and csr_b are CSRTensor, alpha and beta are both Tensor. |
|
|
Computes arcsine of input csr_tensors element-wise. |
|
|
Computes inverse hyperbolic sine of the input element-wise. |
|
|
Computes the trigonometric inverse tangent of the input element-wise. |
|
|
Computes inverse hyperbolic tangent of the input element-wise. |
|
|
Rounds a CSRTensor up to the closest integer element-wise. |
|
|
Computes cosine of input element-wise. |
|
|
Computes hyperbolic cosine of input element-wise. |
|
|
Returns csr_exponential of a CSRTensor element-wise. |
|
|
Returns exponential then minus 1 of a CSRTensor element-wise. |
|
|
Rounds a CSRTensor down to the closest integer element-wise. |
|
|
Computes Reciprocal of input CSRTensor element-wise. |
|
|
Determines which elements are finite for each position. |
|
|
Determines which elements are inf or -inf for each position. |
|
|
Determines which elements are NaN for each position. |
|
|
Returns the natural logarithm of a CSRTensor element-wise. |
|
|
Returns the natural logarithm of one plus the input CSRTensor element-wise. |
|
|
Returns a CSRTensor with csr_negative values of the input CSRTensor element-wise. |
|
|
Computes ReLU (Rectified Linear Unit activation function) of input csr_tensors element-wise. |
|
|
Computes ReLU (Rectified Linear Unit) upper bounded by 6 of input csr_tensors element-wise. |
|
|
Returns half to even of a CSRTensor element-wise. |
|
|
Sigmoid activation function. |
|
|
Computes sine of the input element-wise. |
|
|
Computes hyperbolic sine of the input element-wise. |
|
|
Calculates the softmax of a CSRTensorMatrix. |
|
|
Softsign activation function. |
|
|
Returns sqrt of a CSRTensor element-wise. |
|
|
Returns square of a CSRTensor element-wise. |
|
|
Computes tangent of x element-wise. |
|
|
Computes hyperbolic tangent of input element-wise. |
|
Gradient Clipping
API Name |
Description |
Supported Platforms |
Clips tensor values by the ratio of the sum of their norms. |
|
|
Clips tensor values to a specified min and max. |
|
Parameter Operation Functions
API Name |
Description |
Supported Platforms |
Assigns Parameter with a value. |
|
|
Updates a Parameter by adding a value to it. |
|
|
Updates a Parameter by subtracting a value from it. |
|
|
Using given values to update tensor value through the add operation, along with the input indices. |
|
|
Using given values to update tensor value through the div operation, along with the input indices. |
|
|
Using given values to update tensor value through the max operation, along with the input indices. |
|
|
Using given values to update tensor value through the min operation, along with the input indices. |
|
|
Using given values to update tensor value through the mul operation, along with the input indices. |
|
|
Applies sparse addition to individual values or slices in a tensor. |
|
|
Applying sparse division to individual values or slices in a tensor. |
|
|
Applying sparse maximum to individual values or slices in a tensor. |
|
|
Applying sparse minimum to individual values or slices in a tensor. |
|
|
Applies sparse multiplication to individual values or slices in a tensor. |
|
|
Applies sparse subtraction to individual values or slices in a tensor. |
|
|
Updates tensor values by using input indices and value. |
|
Differential Functions
API Name |
Description |
Supported Platforms |
This function is designed to calculate the higher order differentiation of given composite function. |
|
|
This function is designed to calculate the higher order differentiation of given composite function. |
|
|
StopGradient is used for eliminating the effect of a value on the gradient, such as truncating the gradient propagation from an output of a function. |
|
Debugging Functions
API Name |
Description |
Supported Platforms |
Outputs the inputs to stdout. |
|
Image Functions
API Name |
Description |
Supported Platforms |
Decodes bounding boxes locations. |
|
|
Encodes bounding boxes locations. |
|
|
Checks bounding box. |
|
|
Extracts crops from the input image Tensor and resizes them. |
|
|
Given an input_x and a flow-field grid, computes the output using input_x values and pixel locations from grid. |
|
|
Calculates intersection over union for boxes. |
|
|
Pads the input tensor according to the padding. |
|
|
Extends the last dimension of the input tensor from 1 to pad_dim_size, by filling with 0. |
|
|
Applies a pixel_shuffle operation over an input signal composed of several input planes. |
|
|
Applies a pixel_unshuffle operation over an input signal composed of several input planes. |
|