Enum tc_tensor::Tensor

source ·
pub enum Tensor<FD, FS, D, T> {
    Dense(DenseTensor<FD, FS, D, T, DenseAccessor<FD, FS, D, T>>),
    Sparse(SparseTensor<FD, FS, D, T, SparseAccessor<FD, FS, D, T>>),
}
Expand description

An n-dimensional array of numbers which supports basic math and logic operations

Variants§

§

Dense(DenseTensor<FD, FS, D, T, DenseAccessor<FD, FS, D, T>>)

§

Sparse(SparseTensor<FD, FS, D, T, SparseAccessor<FD, FS, D, T>>)

Implementations§

Get the Schema of this Tensor

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more
Converts to this type from the input type.
Converts to this type from the input type.
The decoding context of this type, useful in situations where the stream to be decoded may be too large to hold in main memory. Read more
Parse this value using the given Decoder.
The Class type of this instance
Returns the [Class] of this instance.
The type of Transaction which this state supports
The type of encodable view returned by into_view
Return a View which can be encoded with en::IntoStream.
The datatype of this Tensor
The number of dimensions of this Tensor
The shape of this Tensor
The number of elements in this Tensor
The result type of a boolean operation.
The result type of a boolean operation which may ignore right-hand values.
Logical and
Logical or
Logical xor
The result type of a boolean operation.
The result type of a boolean operation which may ignore right-hand values.
Logical and
Logical or
Logical xor
The result type of a boolean operation.
The result type of a boolean operation which may ignore right-hand values.
Logical and
Logical or
Logical xor
The return type of a boolean operation.
The return type of a boolean operation with a result expected to be dense.
Logical and
Logical or
Logical xor
The result of a comparison operation
The result of a comparison operation which can only return a dense Tensor
Element-wise equality
Element-wise greater-than
Element-wise greater-or-equal
Element-wise less-than
Element-wise less-or-equal
Element-wise not-equal
The result of a comparison operation
The result of a comparison operation which can only return a dense Tensor
Element-wise equality
Element-wise greater-than
Element-wise greater-or-equal
Element-wise less-than
Element-wise less-or-equal
Element-wise not-equal
The result of a comparison operation
The result of a comparison operation which can only return a dense Tensor
Element-wise equality
Element-wise greater-than
Element-wise greater-or-equal
Element-wise less-than
Element-wise less-or-equal
Element-wise not-equal
The result of a comparison operation
Element-wise equality
Element-wise greater-than
Element-wise greater-or-equal
Element-wise less-than
Element-wise less-or-equal
Element-wise not-equal
The type of Transaction to expect
The type of Tensor returned by diagonal
The type of Transaction to expect
Overwrite the slice of this Tensor given by Bounds with the given value.
The type of Transaction to expect
Overwrite the slice of this Tensor given by Bounds with the given value.
The type of Transaction to expect
Overwrite the slice of this Tensor given by Bounds with the given value.
The type of Transaction to expect
Read a single value from this Tensor.
Write a single value to the slice of this Tensor with the given Bounds.
Overwrite a single element of this Tensor.
The type of Transaction to expect
The type of Tensor returned by argmax.
Return the indices of the maximum values in this Tensor along the given axis.
Return the offset of the maximum value in this Tensor.
A dense representation of this Tensor
A sparse representation of this Tensor
Return a dense representation of this Tensor.
Return a sparse representation of this Tensor.
The result type of a math operation
The result type of a math operation which may ignore right-hand-side values
Add two tensors together.
Divide self by other.
Element-wise logarithm of self with respect to the given base.
Multiply two tensors together.
Raise self to the power of other.
Subtract other from self.
The result type of a math operation
The result type of a math operation which may ignore right-hand-side values
Add two tensors together.
Divide self by other.
Element-wise logarithm of self with respect to the given base.
Multiply two tensors together.
Raise self to the power of other.
Subtract other from self.
The result type of a math operation
The result type of a math operation which may ignore right-hand-side values
Add two tensors together.
Divide self by other.
Element-wise logarithm of self with respect to the given base.
Multiply two tensors together.
Raise self to the power of other.
Subtract other from self.
The return type of a math operation
The return type of a math operation with a result expected to be dense
Add a constant to this tensor
Divide self by other.
Element-wise logarithm
Multiply self by other.
Raise self to the power other.
Subtract other from self.
The type of Transaction to expect
The result type of a reduce operation
Return the maximum of this Tensor along the given axis.
Return the maximum element in this Tensor.
Return the minimum of this Tensor along the given axis.
Return the minimum element in this Tensor.
Return the product of this Tensor along the given axis.
Return the product of all elements in this Tensor.
Return the sum of this Tensor along the given axis.
Return the sum of all elements in this Tensor.
A broadcast Tensor
A type-cast Tensor
A Tensor with an expanded dimension
A Tensor flipped around one axis
A reshaped Tensor
A Tensor slice
A transposed Tensor
Broadcast this Tensor to the given shape.
Cast this Tensor to the given dtype.
Insert a new dimension of size 1 at the given axis.
Flip this Tensor around the given axis.
Change the shape of this Tensor.
Return a slice of this Tensor with the given bounds.
Transpose this Tensor by reordering its axes according to the given permutation. If no permutation is given, the axes will be reversed.
The return type of a unary operation
Element-wise arcsine
Element-wise sine
Element-wise hyperbolic arcsine
Element-wise hyperbolic sine
Element-wise arccosine
Element-wise cosine
Element-wise hyperbolic arccosine
Element-wise hyperbolic cosine
Element-wise arctangent
Element-wise tangent
Element-wise hyperbolic arctangent
Element-wise hyperbolic tangent
The type of Transaction to expect
The return type of a unary operation
Element-wise absolute value
Element-wise exponentiation
Element-wise natural logarithm
Element-wise round to the nearest integer
Return true if all elements in this Tensor are nonzero.
Return true if any element in this Tensor is nonzero.
Element-wise logical not

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Cast an instance of T into an instance of Self.
Cast an instance of Self into an instance of T.

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Returns true if self can be cast into the target type T.
Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
Converts the given value to a String. Read more
Test if value can be cast into Self.
Returns Some(Self) if the source value can be cast into Self, otherwise None.
Returns Ok(Self) if the source value can be cast into Self, otherwise calls on_err.
Test if self can be cast into T.
Returns Some(T) if self can be cast into T, otherwise None.
Returns Ok(T) if self can be cast into T, otherwise calls on_err.
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.