public class BatchNormalizationParamInitializer extends Object implements ParamInitializer
Modifier and Type | Field and Description |
---|---|
static String |
BETA |
static String |
GAMMA |
static String |
GLOBAL_MEAN |
static String |
GLOBAL_VAR |
Constructor and Description |
---|
BatchNormalizationParamInitializer() |
Modifier and Type | Method and Description |
---|---|
Map<String,org.nd4j.linalg.api.ndarray.INDArray> |
getGradientsFromFlattened(NeuralNetConfiguration conf,
org.nd4j.linalg.api.ndarray.INDArray gradientView)
Return a map of gradients (in their standard non-flattened representation), taken from the flattened (row vector) gradientView array.
|
static BatchNormalizationParamInitializer |
getInstance() |
Map<String,org.nd4j.linalg.api.ndarray.INDArray> |
init(NeuralNetConfiguration conf,
org.nd4j.linalg.api.ndarray.INDArray paramView,
boolean initializeParams)
Initialize the parameters
|
static List<String> |
keys() |
int |
numParams(Layer l) |
int |
numParams(NeuralNetConfiguration conf) |
public static final String GAMMA
public static final String BETA
public static final String GLOBAL_MEAN
public static final String GLOBAL_VAR
public static BatchNormalizationParamInitializer getInstance()
public int numParams(NeuralNetConfiguration conf)
numParams
in interface ParamInitializer
public int numParams(Layer l)
numParams
in interface ParamInitializer
public Map<String,org.nd4j.linalg.api.ndarray.INDArray> init(NeuralNetConfiguration conf, org.nd4j.linalg.api.ndarray.INDArray paramView, boolean initializeParams)
ParamInitializer
init
in interface ParamInitializer
conf
- the configurationparamView
- 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,org.nd4j.linalg.api.ndarray.INDArray> getGradientsFromFlattened(NeuralNetConfiguration conf, org.nd4j.linalg.api.ndarray.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 ParamInitializer
conf
- ConfigurationgradientView
- The flattened gradients array, as a view of the larger arrayCopyright © 2017. All rights reserved.