Class EmbeddingLayer.Builder

    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • hasBias

        public EmbeddingLayer.Builder hasBias​(boolean hasBias)
        If true: include bias parameters in the layer. False (default): no bias.
        Parameters:
        hasBias - If true: include bias parameters in this layer
      • weightInit

        public EmbeddingLayer.Builder weightInit​(EmbeddingInitializer embeddingInitializer)
        Initialize the embedding layer using the specified EmbeddingInitializer - such as a Word2Vec instance
        Parameters:
        embeddingInitializer - Source of the embedding layer weights
      • weightInit

        public EmbeddingLayer.Builder weightInit​(INDArray vectors)
        Initialize the embedding layer using values from the specified array. Note that the array should have shape [vocabSize, vectorSize]. After copying values from the array to initialize the network parameters, the input array will be discarded (so that, if necessary, it can be garbage collected)
        Parameters:
        vectors - Vectors to initialize the embedding layer with