Package ai.djl.nn.core
Contains classes that define simple neural network operations.
-
Interface Summary Interface Description AbstractEmbedding<T> An Embedding maps elements of type T to a 1-Dimensional representativeNDArrays.AbstractIndexedEmbedding<T> AnAbstractEmbeddingwhere each embedded item can be assigned an integer index. -
Class Summary Class Description ConstantEmbedding AnAbstractIndexedEmbeddingthat always returns a constant value.Embedding<T> An Embedding block map a collection of items to 1-Dimensional representativeNDArrays.Embedding.BaseBuilder<T,B extends Embedding.BaseBuilder<T,B>> Linear A Linear block applies a linear transformation \(Y = XW^T + b\).Linear.Builder LinearCollection A LinearCollection block applies \(m\) linear transformations \(Y_i = X_i W_i + b_i\) for each \(i \in [1, \ldots, m]\) and \(m = \prod_{j=1}^t s_j\).LinearCollection.Builder The Builder to construct aLinearCollectiontype ofBlock.Multiplication A Multiplication block performs an element-wise multiplication of inputs and weights as opposed to aLinearblock which additionally sums up each element-wise multiplication.Multiplication.Builder The Builder to construct aMultiplicationtype ofBlock.Prelu Applies Leaky Parametric ReLU activation element-wise to the input.SparseMax SparseMaxcontains a generic implementation of sparsemax function the definition of SparseMax can be referred to https://arxiv.org/pdf/1602.02068.pdf.