Class WeightInitEmbedding
- java.lang.Object
-
- org.deeplearning4j.nn.weights.embeddings.WeightInitEmbedding
-
- All Implemented Interfaces:
Serializable
,IWeightInit
public class WeightInitEmbedding extends Object implements IWeightInit
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface org.deeplearning4j.nn.weights.IWeightInit
DEFAULT_WEIGHT_INIT_ORDER
-
-
Constructor Summary
Constructors Modifier Constructor Description WeightInitEmbedding(@NonNull EmbeddingInitializer embeddingInitializer)
protected
WeightInitEmbedding(EmbeddingInitializer serializableInit, EmbeddingInitializer nonSerializableInit)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description INDArray
init(double fanIn, double fanOut, long[] shape, char order, INDArray paramView)
Initialize parameters in the given view.long[]
shape()
-
-
-
Constructor Detail
-
WeightInitEmbedding
public WeightInitEmbedding(@NonNull @NonNull EmbeddingInitializer embeddingInitializer)
-
WeightInitEmbedding
protected WeightInitEmbedding(EmbeddingInitializer serializableInit, EmbeddingInitializer nonSerializableInit)
-
-
Method Detail
-
init
public INDArray init(double fanIn, double fanOut, long[] shape, char order, INDArray paramView)
Description copied from interface:IWeightInit
Initialize parameters in the given view. Double values are used for fanIn and fanOut as some layers (convolution with stride) results in a non-integer number which may be truncated to zero in certain configurations- Specified by:
init
in interfaceIWeightInit
- Parameters:
fanIn
- Number of input parametersfanOut
- Number of output parametersshape
- Desired shape of array (users shall assume paramView has this shape after method has finished)order
- Order of array, e.g. Fortran ('f') or C ('c')paramView
- View of parameters to initialize (and reshape)
-
shape
public long[] shape()
-
-