public class CenterLossParamInitializer extends DefaultParamInitializer
| Modifier and Type | Field and Description |
|---|---|
static String |
BIAS_KEY |
static String |
CENTER_KEY |
static String |
WEIGHT_KEY |
GAIN_KEY| Constructor and Description |
|---|
CenterLossParamInitializer() |
| Modifier and Type | Method and Description |
|---|---|
protected INDArray |
createCenterLossMatrix(NeuralNetConfiguration conf,
INDArray centerLossView,
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 CenterLossParamInitializer |
getInstance() |
Map<String,INDArray> |
init(NeuralNetConfiguration conf,
INDArray paramsView,
boolean initializeParams)
Initialize the parameters
|
long |
numParams(NeuralNetConfiguration conf) |
biasKeys, createBias, createBias, createGain, createGain, createWeightMatrix, createWeightMatrix, hasBias, hasLayerNorm, isBiasParam, isWeightParam, numParams, paramKeys, weightKeyspublic static final String WEIGHT_KEY
public static final String BIAS_KEY
public static final String CENTER_KEY
public static CenterLossParamInitializer getInstance()
public long numParams(NeuralNetConfiguration conf)
numParams in interface ParamInitializernumParams in class DefaultParamInitializerpublic Map<String,INDArray> init(NeuralNetConfiguration conf, INDArray paramsView, boolean initializeParams)
ParamInitializerinit 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)
ParamInitializer#init(Map, NeuralNetConfiguration, INDArray);
thus the position in the view (and, the array orders) must match those of the parametersgetGradientsFromFlattened in interface ParamInitializergetGradientsFromFlattened in class DefaultParamInitializerconf - ConfigurationgradientView - The flattened gradients array, as a view of the larger arrayprotected INDArray createCenterLossMatrix(NeuralNetConfiguration conf, INDArray centerLossView, boolean initializeParameters)
Copyright © 2020. All rights reserved.