TorchLean API

NN.Spec.Core.Scalar

Scalar #

Spec-only scalar conventions.

These aliases fix their scalar to ℝ for mathematical reasoning. Typed tensors and model execution also support native Float/Float32 and FloatLib configured binary scalars through Context.

Because SpecScalar is ℝ, this module brings in Mathlib's real-analysis hierarchy. It does not provide the real Context instance; import NN.Spec.Core.Context.Real for that. Anything that only needs Float or a general [Context α] should import NN.Spec.Core.Context and stay light.

References / context:

@[reducible, inline]

Spec scalars live in ℝ.

Instances For
    @[reducible, inline]
    abbrev Spec.SpecTensor (s : Shape) :

    Spec tensors are Real-typed tensors.

    Instances For