Class Embedding
java.lang.Object
ai.beestream.jitnn.nn.Module
ai.beestream.jitnn.nn.Embedding
- All Implemented Interfaces:
AutoCloseable
A lookup table of
count vectors of size dim, applied to INT32 indices.
Initialised like PyTorch's nn.Embedding: standard normal entries.-
Constructor Summary
ConstructorsConstructorDescriptionEmbedding(int count, int dim, int paddingIdx, long seed) RowpaddingIdxreceives no gradient (pass -1 for none).Embedding(int count, int dim, long seed) A table ofcountvectors of sizedim, standard normal fromseed, every row trained.An embedding with the given initial table [count, dim]. -
Method Summary
Methods inherited from class Module
buffer, buffers, child, close, isClosed, isTraining, loadStateDict, parameter, parameterCount, parameters, stateDict, train, zeroGrad
-
Constructor Details
-
Embedding
public Embedding(int count, int dim, long seed) A table ofcountvectors of sizedim, standard normal fromseed, every row trained. -
Embedding
public Embedding(int count, int dim, int paddingIdx, long seed) RowpaddingIdxreceives no gradient (pass -1 for none). -
Embedding
An embedding with the given initial table [count, dim].
-
-
Method Details
-
weight
The table [count, dim]. -
forward
-