TorchLean API

NN.API.Models.SimpleSeq

Simple Sequence Model Helpers (API) #

Small, reusable constructors for “sequence core + time-distributed linear head” models used by the rnn and lstm runnable examples.

These helpers live in the API layer so examples can stay focused on: corpus loading, sample construction, and training loops.

Configuration for an RNN/LSTM sequence model with a time-distributed linear head.

Shapes follow the convention used by the runnable examples:

  • input: (seqLen × inputSize)
  • output logits/targets: (seqLen × inputSize)
Instances For
    @[reducible, inline]

    Input shape (seqLen × inputSize) for SeqRnnHeadConfig.

    Instances For
      @[reducible, inline]

      Output shape (seqLen × inputSize) for SeqRnnHeadConfig.

      Instances For

        Vanilla RNN core plus time-distributed linear head:

        rnn(seqLen,inputSize,hiddenSize) → linear(hiddenSize → inputSize).

        Instances For

          LSTM core plus time-distributed linear head:

          lstm(seqLen,inputSize,hiddenSize) → linear(hiddenSize → inputSize).

          Instances For