Unary Operations
Unary operators are operators that only contain only a single input. Applying them to MaskedTensors is relatively straightforward at the moment: if the data is masked out at a given index, we apply the operator, and if not, then we’ll continue to mask out the data.
The available unary operators are:
|
Computes the absolute value of each element in |
|
Alias for |
|
Computes the inverse cosine of each element in |
|
Alias for |
|
Returns a new tensor with the inverse hyperbolic cosine of the elements of |
|
Alias for |
|
Computes the element-wise angle (in radians) of the given |
|
Returns a new tensor with the arcsine of the elements of |
|
Alias for |
|
Returns a new tensor with the inverse hyperbolic sine of the elements of |
|
Alias for |
|
Returns a new tensor with the arctangent of the elements of |
|
Alias for |
|
Returns a new tensor with the inverse hyperbolic tangent of the elements of |
|
Alias for |
|
Computes the bitwise NOT of the given input tensor. |
|
Returns a new tensor with the ceil of the elements of |
|
Clamps all elements in |
|
Alias for |
|
Computes the element-wise conjugate of the given |
|
Returns a new tensor with the cosine of the elements of |
|
Returns a new tensor with the hyperbolic cosine of the elements of |
|
Returns a new tensor with each of the elements of |
|
Alias for |
|
Alias for |
|
Alias for |
|
Alias for |
|
Returns a new tensor with the exponential of the elements of the input tensor |
|
Alias for |
|
Alias for |
|
Alias for |
|
Returns a new tensor with the floor of the elements of |
|
Computes the fractional portion of each element in |
|
Computes the natural logarithm of the absolute value of the gamma function on |
|
Returns a new tensor with the natural logarithm of the elements of |
|
Returns a new tensor with the logarithm to the base 10 of the elements of |
|
Returns a new tensor with the natural logarithm of (1 + |
|
Returns a new tensor with the logarithm to the base 2 of the elements of |
|
Alias for |
|
Alias for |
|
Returns a new tensor with boolean elements representing if each element of |
|
Replaces |
|
Returns a new tensor with the negative of the elements of |
|
Alias for |
|
Returns |
|
Takes the power of each element in |
|
Returns a new tensor with each of the elements of |
|
Returns a new tensor with the reciprocal of the elements of |
|
Rounds elements of |
|
Returns a new tensor with the reciprocal of the square-root of each of the elements of |
|
Alias for |
|
Returns a new tensor with the signs of the elements of |
|
This function is an extension of torch.sign() to complex tensors. |
|
Tests if each element of |
|
Returns a new tensor with the sine of the elements of |
|
Alias for |
|
Returns a new tensor with the hyperbolic sine of the elements of |
|
Returns a new tensor with the square-root of the elements of |
|
Returns a new tensor with the square of the elements of |
|
Returns a new tensor with the tangent of the elements of |
|
Returns a new tensor with the hyperbolic tangent of the elements of |
|
Returns a new tensor with the truncated integer values of the elements of |
The available inplace unary operators are all of the above except:
|
Computes the element-wise angle (in radians) of the given |
|
Returns |
|
Tests if each element of |
|
Returns a new tensor with boolean elements representing if each element of |