Package ai.djl.nn.core
Interface AbstractEmbedding<T>
-
- Type Parameters:
T- the type of item that should be embedded
- All Known Subinterfaces:
AbstractIndexedEmbedding<T>
- All Known Implementing Classes:
ConstantEmbedding,Embedding,Embedding.DefaultEmbedding,Embedding.DefaultItem,TrainableWordEmbedding
public interface AbstractEmbedding<T>An Embedding maps elements of type T to a 1-Dimensional representativeNDArrays.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description NDArrayembed(NDManager manager, T[] items)Embeds an array of items.booleanhasItem(T item)Returns whether an item is in the embedding.
-
-
-
Method Detail
-
hasItem
boolean hasItem(T item)
Returns whether an item is in the embedding.- Parameters:
item- the item to test- Returns:
- true if the item is in the embedding
-
-