Eager Tensor Operations #
PyTorch-style tensor operations recorded on the session's tape. Each one runs the CPU or the CUDA
kernel of the operation, as the session's device selects, and preserves the typed TensorRef
surface.
Neural-network layers #
Normalize score rows and aggregate values, retaining the compound local pullback.
Instances For
Fully-connected linear layer y = w x + b. PyTorch: torch.nn.functional.linear.
Instances For
Mean-squared-error loss returning a scalar. PyTorch: torch.nn.functional.mse_loss.
Instances For
Mean weighted logits cross-entropy, recorded on the selected backend's existing tape.
Instances For
Mean teacher-logit cross-entropy, recorded on the selected backend's existing tape.
Instances For
Layer normalization over embedding dimension. PyTorch: nn.LayerNorm / functional.layer_norm.
Instances For
Batch normalization over every spatial axis of a channel-first tensor.
Instances For
CPU attention for one sequence, recorded on TorchLean's reference tape.
Instances For
Self-attention with an optional leading batch dimension.
The head count is numHeads; batch := some b selects inputs of shape [b, n, dModel].
CPU execution maps the reference operation over samples; GPU execution records one tape node
for the batch and evaluates it through multiple LibTorch primitives.