TorchLean API

NN.API.Neural.Heads

Task heads for public neural-network models.

The definitions here package classifier, regression, and language-model heads that sit on top of the reusable block and Transformer APIs.

Classification head: Flatten -> Linear.

Named head constructor built from nn.flattenLinear.

Instances For
    def TorchLean.nn.Internal.heads.regressor {s : Spec.Shape} (outDim : := 1) (seedW seedB : := 0) :

    Regression head: Flatten -> Linear with outDim outputs.

    Instances For

      Flatten(start_dim=1) -> Linear head for batched tensors.

      Input: N × σ Output: Mat N classes

      Instances For

        Batched regression head: Flatten(start_dim=1) -> Linear(_, outDim) producing Mat N outDim.

        Instances For