Mathematical modules #
Spec.Module α σ τ packages a pure tensor map from shape σ to shape τ. The input and output
shapes occur in the type, so ill-shaped compositions are rejected by Lean.
Spec.Module.Chain composes these maps. The kind and pythonExpr fields are descriptive
metadata; forward alone gives the module its mathematical meaning.
A pure, shape-indexed tensor map with descriptive code-generation metadata.
- forward : TorchLean.Tensor α inShape → TorchLean.Tensor α outShape
The mathematical meaning of the module.
- kind : String
A stable operation name used in reports and exported graphs.
- pythonExpr : String
A Python expression used by the source exporter. This field is not part of the semantics.
Instances For
Evaluate a chain from left to right.
Instances For
Append one module to the output of a chain.
Instances For
Return operation names in evaluation order.
Instances For
Return operation names and Python expressions in evaluation order.
Instances For
Select one coordinate along any valid axis.