public static class EmbeddingLayer.Builder extends FeedForwardLayer.Builder<EmbeddingLayer.Builder>
nIn, nOut
activationFn, biasInit, biasUpdater, gainInit, gradientNormalization, gradientNormalizationThreshold, iupdater, regularization, regularizationBias, weightInitFn, weightNoise
allParamConstraints, biasConstraints, iDropout, layerName, weightConstraints
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
EmbeddingLayer |
build() |
EmbeddingLayer.Builder |
hasBias(boolean hasBias)
If true: include bias parameters in the layer.
|
EmbeddingLayer.Builder |
weightInit(EmbeddingInitializer embeddingInitializer)
Initialize the embedding layer using the specified EmbeddingInitializer - such as a Word2Vec instance
|
EmbeddingLayer.Builder |
weightInit(INDArray vectors)
Initialize the embedding layer using values from the specified array.
|
EmbeddingLayer.Builder |
weightInit(IWeightInit weightInit)
Weight initialization scheme to use, for initial weight values
|
nIn, nIn, nOut, nOut, units
activation, activation, biasInit, biasUpdater, dist, gainInit, gradientNormalization, gradientNormalizationThreshold, l1, l1Bias, l2, l2Bias, regularization, regularizationBias, updater, updater, weightDecay, weightDecay, weightDecayBias, weightDecayBias, weightInit, weightInit, weightNoise
constrainAllParameters, constrainBias, constrainWeights, dropOut, dropOut, name
public EmbeddingLayer.Builder hasBias(boolean hasBias)
hasBias
- If true: include bias parameters in this layerpublic EmbeddingLayer.Builder weightInit(IWeightInit weightInit)
BaseLayer.Builder
weightInit
in class BaseLayer.Builder<EmbeddingLayer.Builder>
IWeightInit
public EmbeddingLayer.Builder weightInit(EmbeddingInitializer embeddingInitializer)
embeddingInitializer
- Source of the embedding layer weightspublic EmbeddingLayer.Builder weightInit(INDArray vectors)
vectors
- Vectors to initialize the embedding layer withpublic EmbeddingLayer build()
build
in class Layer.Builder<EmbeddingLayer.Builder>
Copyright © 2019. All rights reserved.