TensorPartialDivisionAlgebra

interface TensorPartialDivisionAlgebra<T> : TensorAlgebra<T>

Algebra over a field with partial division on Tensor. For more information: https://proofwiki.org/wiki/Definition:Division_Algebra

Parameters

T

the type of items closed under division in the tensors.

Functions

argMax
Link copied to clipboard
abstract fun Tensor<T>.argMax(dim: Int, keepDim: Boolean): Tensor<T>
Returns the index of maximum value of each row of the input tensor in the given dimension dim.
binaryOperation
Link copied to clipboard
open fun binaryOperation(operation: String, left: Tensor<T>, right: Tensor<T>): Tensor<T>
binaryOperationFunction
Link copied to clipboard
open fun binaryOperationFunction(operation: String): (Tensor<T>, Tensor<T>) -> Tensor<T>
bindSymbol
Link copied to clipboard
open fun bindSymbol(value: String): Tensor<T>
bindSymbolOrNull
Link copied to clipboard
open fun bindSymbolOrNull(value: String): Tensor<T>?
diagonalEmbedding
Link copied to clipboard
abstract fun diagonalEmbedding(diagonalEntries: Tensor<T>, offset: Int = 0, dim1: Int = -2, dim2: Int = -1): Tensor<T>
Creates a tensor whose diagonals of certain 2D planes (specified by dim1 and dim2) are filled by diagonalEntries.
div
Link copied to clipboard
abstract operator fun T.div(other: Tensor<T>): Tensor<T>
Each element of the tensor other is divided by this value.
abstract operator fun Tensor<T>.div(value: T): Tensor<T>
Divide by the scalar value each element of this tensor returns a new resulting tensor.
abstract operator fun Tensor<T>.div(other: Tensor<T>): Tensor<T>
Each element of the tensor other is divided by each element of this tensor.
divAssign
Link copied to clipboard
abstract operator fun Tensor<T>.divAssign(value: T)
Divides by the scalar value each element of this tensor.
abstract operator fun Tensor<T>.divAssign(other: Tensor<T>)
Each element of this tensor is divided by each element of the other tensor.
dot
Link copied to clipboard
abstract infix fun Tensor<T>.dot(other: Tensor<T>): Tensor<T>
Matrix product of two tensors.
get
Link copied to clipboard
abstract operator fun Tensor<T>.get(i: Int): Tensor<T>
Returns the tensor at index i For more information: https://pytorch.org/cppdocs/notes/tensor_indexing.
max
Link copied to clipboard
abstract fun Tensor<T>.max(): T
Returns the maximum value of all elements in the input tensor.
abstract fun Tensor<T>.max(dim: Int, keepDim: Boolean): Tensor<T>
Returns the maximum value of each row of the input tensor in the given dimension dim.
min
Link copied to clipboard
abstract fun Tensor<T>.min(): T
abstract fun Tensor<T>.min(dim: Int, keepDim: Boolean): Tensor<T>
Returns the minimum value of each row of the input tensor in the given dimension dim.
minus
Link copied to clipboard
abstract operator fun T.minus(other: Tensor<T>): Tensor<T>
Each element of the tensor other is subtracted from this value.
abstract operator fun Tensor<T>.minus(value: T): Tensor<T>
Subtracts the scalar value from each element of this tensor and returns a new resulting tensor.
abstract operator fun Tensor<T>.minus(other: Tensor<T>): Tensor<T>
Each element of the tensor other is subtracted from each element of this tensor.
minusAssign
Link copied to clipboard
abstract operator fun Tensor<T>.minusAssign(value: T)
Subtracts the scalar value from each element of this tensor.
abstract operator fun Tensor<T>.minusAssign(other: Tensor<T>)
Each element of the tensor other is subtracted from each element of this tensor.
plus
Link copied to clipboard
abstract operator fun T.plus(other: Tensor<T>): Tensor<T>
Each element of the tensor other is added to this value.
abstract operator fun Tensor<T>.plus(value: T): Tensor<T>
Adds the scalar value to each element of this tensor and returns a new resulting tensor.
abstract operator fun Tensor<T>.plus(other: Tensor<T>): Tensor<T>
Each element of the tensor other is added to each element of this tensor.
plusAssign
Link copied to clipboard
abstract operator fun Tensor<T>.plusAssign(value: T)
Adds the scalar value to each element of this tensor.
abstract operator fun Tensor<T>.plusAssign(other: Tensor<T>)
Each element of the tensor other is added to each element of this tensor.
sum
Link copied to clipboard
abstract fun Tensor<T>.sum(): T
abstract fun Tensor<T>.sum(dim: Int, keepDim: Boolean): Tensor<T>
Returns the sum of each row of the input tensor in the given dimension dim.
times
Link copied to clipboard
abstract operator fun T.times(other: Tensor<T>): Tensor<T>
Each element of the tensor other is multiplied by this value.
abstract operator fun Tensor<T>.times(value: T): Tensor<T>
Multiplies the scalar value by each element of this tensor and returns a new resulting tensor.
abstract operator fun Tensor<T>.times(other: Tensor<T>): Tensor<T>
Each element of the tensor other is multiplied by each element of this tensor.
timesAssign
Link copied to clipboard
abstract operator fun Tensor<T>.timesAssign(value: T)
Multiplies the scalar value by each element of this tensor.
abstract operator fun Tensor<T>.timesAssign(other: Tensor<T>)
Each element of the tensor other is multiplied by each element of this tensor.
transpose
Link copied to clipboard
abstract fun Tensor<T>.transpose(i: Int = -2, j: Int = -1): Tensor<T>
Returns a tensor that is a transposed version of this tensor.
unaryMinus
Link copied to clipboard
abstract operator fun Tensor<T>.unaryMinus(): Tensor<T>
Numerical negative, element-wise.
unaryOperation
Link copied to clipboard
open fun unaryOperation(operation: String, arg: Tensor<T>): Tensor<T>
unaryOperationFunction
Link copied to clipboard
open fun unaryOperationFunction(operation: String): (Tensor<T>) -> Tensor<T>
value
Link copied to clipboard
open fun Tensor<T>.value(): T
Returns a single tensor value of unit dimension.
valueOrNull
Link copied to clipboard
abstract fun Tensor<T>.valueOrNull(): T?
Returns a single tensor value of unit dimension if tensor shape equals to 1.
view
Link copied to clipboard
abstract fun Tensor<T>.view(shape: IntArray): Tensor<T>
Returns a new tensor with the same data as the self tensor but of a different shape.
viewAs
Link copied to clipboard
abstract fun Tensor<T>.viewAs(other: Tensor<T>): Tensor<T>
View this tensor as the same size as other.

Inheritors

AnalyticTensorAlgebra
Link copied to clipboard
LinearOpsTensorAlgebra
Link copied to clipboard
DoubleTensorAlgebra
Link copied to clipboard

Sources

common source
Link copied to clipboard