Embedding layer
This card is a wrapper of this Keras class.
Note: the backend for building and training neural networks is based on Keras. The documentation of this card is a variant of the documentation of its corresponding class.
Inputs
-
Input dim — Integer
Size of the vocabulary, i.e. maximum integer index + 1.
-
Output dim — Integer
Dimension of the dense embedding.
-
Embeddings initializer — NeuralNetworkInitializer
Initializer for the embeddings matrix. If not specified, then Glorot uniform initializer is used.
-
Activity regularizer — NeuralNetworkRegularizer
Regularizer function applied to the output of the layer (its “activation”).
-
Embeddings constraint — NeuralNetworkConstraint
Constraint function applied to the embeddings matrix.
-
Mask zero — Boolean
Whether or not the input value 0 is a special “padding” value that should be masked out. This is useful when using recurrent layers which may take variable length input. If “true”, then all subsequent layers in the model need to support masking or an exception will be raised. If “true”, as a consequence, index 0 cannot be used in the vocabulary (Input dim should equal size of vocabulary + 1).
-
Input length — Integer
Length of input sequences, when it is constant. This argument is required if you are going to connect Flatten then Dense layers upstream (without it, the shape of the dense outputs cannot be computed).
-
Input — NeuralNetworkTensor
Input of this layer.
Outputs
-
Layer instance — NeuralNetworkLayer
Instance of this layer. It can be wrapped using a Bidirectional or a TimeDistributed wrapper.
-
Output — NeuralNetworkTensor
Output of this layer.