Linear algebra ops
Unreleased native NuTorch shell reference. Generated by
scripts/gen-ops-reference.ts; every op also documents itself with
torch <op> --help. Tensor operands are native values, not strings.
mm
matrix multiply of two 2-D tensors
Signature (placeholders describe arguments; this is not a runnable example):
use torch
torch mm <t1> <t2>
matmul
general matrix product (batched, PyTorch broadcasting)
Signature (placeholders describe arguments; this is not a runnable example):
use torch
torch matmul <t1> <t2>
bmm
batched matrix multiply of two 3-D tensors
Signature (placeholders describe arguments; this is not a runnable example):
use torch
torch bmm <t1> <t2>
dot
dot product of two 1-D tensors
Signature (placeholders describe arguments; this is not a runnable example):
use torch
torch dot <t1> <t2>
outer
outer product of two 1-D tensors
Signature (placeholders describe arguments; this is not a runnable example):
use torch
torch outer <t1> <t2>
einsum
Einstein summation over —equation
Signature (placeholders describe arguments; this is not a runnable example):
use torch
torch einsum <t1>... (at least 1) [--equation <Str>]
tril
lower triangle (—diagonal offset)
Signature (placeholders describe arguments; this is not a runnable example):
use torch
torch tril <t1> [--diagonal <Int>]
triu
upper triangle (—diagonal offset)
Signature (placeholders describe arguments; this is not a runnable example):
use torch
torch triu <t1> [--diagonal <Int>]
diag
diagonal of a matrix, or diagonal matrix from a vector
Signature (placeholders describe arguments; this is not a runnable example):
use torch
torch diag <t1> [--diagonal <Int>]
trace
sum of the main diagonal of a 2-D tensor
Signature (placeholders describe arguments; this is not a runnable example):
use torch
torch trace <t1>
det
determinant of a square matrix
Signature (placeholders describe arguments; this is not a runnable example):
use torch
torch det <t1>
inverse
inverse of a square matrix
Signature (placeholders describe arguments; this is not a runnable example):
use torch
torch inverse <t1>
svd
singular value decomposition (U, S, V)
Signature (placeholders describe arguments; this is not a runnable example):
use torch
torch svd <t1>
solve
solve AX = B for X
Signature (placeholders describe arguments; this is not a runnable example):
use torch
torch solve <t1> <t2>
cross
vector cross product along —dim
Signature (placeholders describe arguments; this is not a runnable example):
use torch
torch cross <t1> <t2> [--dim <Int>]
kron
Kronecker product
Signature (placeholders describe arguments; this is not a runnable example):
use torch
torch kron <t1> <t2>
tensordot
tensor contraction over the last/first —dims dims (default 2)
Signature (placeholders describe arguments; this is not a runnable example):
use torch
torch tensordot <t1> <t2> [--dims <Int>]