public class ElementWiseParamInitializer extends DefaultParamInitializer
BIAS_KEY, GAIN_KEY, WEIGHT_KEY| Constructor and Description |
|---|
ElementWiseParamInitializer() |
| Modifier and Type | Method and Description |
|---|---|
protected INDArray |
createWeightMatrix(long nIn,
long nOut,
IWeightInit weightInit,
INDArray weightParamView,
boolean initializeParameters) |
Map<String,INDArray> |
getGradientsFromFlattened(NeuralNetConfiguration conf,
INDArray gradientView)
Return a map of gradients (in their standard non-flattened representation), taken from the flattened (row vector) gradientView array.
|
static ElementWiseParamInitializer |
getInstance() |
Map<String,INDArray> |
init(NeuralNetConfiguration conf,
INDArray paramsView,
boolean initializeParams)
Initialize the parameters
|
long |
numParams(Layer layer) |
biasKeys, createBias, createBias, createGain, createGain, createWeightMatrix, hasBias, hasLayerNorm, isBiasParam, isWeightParam, numParams, paramKeys, weightKeyspublic static ElementWiseParamInitializer getInstance()
public long numParams(Layer layer)
numParams in interface ParamInitializernumParams in class DefaultParamInitializerpublic Map<String,INDArray> init(NeuralNetConfiguration conf, INDArray paramsView, boolean initializeParams)
init in interface ParamInitializerinit in class DefaultParamInitializerconf - the configurationparamsView - a view of the full network (backprop) parametersinitializeParams - if true: initialize the parameters according to the configuration. If false: don't modify the
values in the paramsView array (but do select out the appropriate subset, reshape etc as required)public Map<String,INDArray> getGradientsFromFlattened(NeuralNetConfiguration conf, INDArray gradientView)
getGradientsFromFlattened in interface ParamInitializergetGradientsFromFlattened in class DefaultParamInitializerconf - ConfigurationgradientView - The flattened gradients array, as a view of the larger arrayprotected INDArray createWeightMatrix(long nIn, long nOut, IWeightInit weightInit, INDArray weightParamView, boolean initializeParameters)
createWeightMatrix in class DefaultParamInitializerCopyright © 2020. All rights reserved.