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 representativeNDArray
s.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description NDArray
embed(NDManager manager, T[] items)
Embeds an array of items.boolean
hasItem(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
-
-