Class CharRnn
java.lang.Object
ai.beestream.jitnn.nn.Module
ai.beestream.jitnn.nn.models.CharRnn
- All Implemented Interfaces:
AutoCloseable
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 Summary
ConstructorsConstructorDescriptionCharRnn(int vocab, int dim, int hidden, int layers, boolean useGru, long seed) A model overvocabtokens: embeddings ofdim,layersLSTM (or GRU, withuseGru) layers ofhiddenfeatures, and the head. -
Method Summary
Methods inherited from class Module
buffer, buffers, child, close, isClosed, isTraining, loadStateDict, parameter, parameterCount, parameters, stateDict, train, zeroGrad
-
Constructor Details
-
CharRnn
public CharRnn(int vocab, int dim, int hidden, int layers, boolean useGru, long seed) A model overvocabtokens: embeddings ofdim,layersLSTM (or GRU, withuseGru) layers ofhiddenfeatures, and the head.
-
-
Method Details
-
forward
-