Class CharRnn

java.lang.Object
ai.beestream.jitnn.nn.Module
ai.beestream.jitnn.nn.models.CharRnn
All Implemented Interfaces:
AutoCloseable

public final class CharRnn extends Module
A recurrent language model: token embedding, a stack of LSTM or GRU layers, a linear head over the vocabulary. Inputs are time first, tokens [T, B]; logits [T, B, vocab]. Seeds: embedding seed (uniform in [-0.1, 0.1)), recurrent layers seed + 1 .. (four per layer), head seed + 100.
  • Constructor Details

    • CharRnn

      public CharRnn(int vocab, int dim, int hidden, int layers, boolean useGru, long seed)
      A model over vocab tokens: embeddings of dim, layers LSTM (or GRU, with useGru) layers of hidden features, and the head.
  • Method Details