Linear-algebra operations for the eager engine.
The definitions here cover matrix products, batched products, affine layers, and the corresponding runtime graph nodes shared by CPU and CUDA-backed execution.
Fully-connected linear layer y = W x + b (matvec).
Type-level shapes enforce W : (outDim, inDim), x : (inDim,), b : (outDim,).
PyTorch comparison: torch.nn.functional.linear.
Instances For
2D matrix multiplication.
PyTorch comparison: torch.matmul(a, b) for 2D tensors.
Instances For
Batched matrix multiplication.
PyTorch comparison: torch.bmm(a, b).
Instances For
Concatenate two 1D vectors along dimension 0.
PyTorch comparison: torch.cat([a, b], dim=0) for vectors.
Instances For
Concatenate two tensors along dimension 0.
PyTorch comparison: torch.cat([a, b], dim=0).
Instances For
Slice along dimension 0: x[start : start+len].
The proof argument h enforces bounds.
PyTorch comparison: x[start:start+len] on tensors with a leading dimension.