public interface ParamInitializer
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.
|
void |
init(Map<String,org.nd4j.linalg.api.ndarray.INDArray> paramsMap,
NeuralNetConfiguration conf,
org.nd4j.linalg.api.ndarray.INDArray paramsView,
boolean initializeParams)
Initialize the parameters
|
int |
numParams(NeuralNetConfiguration conf,
boolean backprop) |
int numParams(NeuralNetConfiguration conf, boolean backprop)
void init(Map<String,org.nd4j.linalg.api.ndarray.INDArray> paramsMap, NeuralNetConfiguration conf, org.nd4j.linalg.api.ndarray.INDArray paramsView, boolean initializeParams)
paramsMap
- the map (initially empty) that will contain a view of the 'paramsView' arrayconf
- 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)Map<String,org.nd4j.linalg.api.ndarray.INDArray> getGradientsFromFlattened(NeuralNetConfiguration conf, org.nd4j.linalg.api.ndarray.INDArray gradientView)
#init(Map, NeuralNetConfiguration, INDArray)
;
thus the position in the view (and, the array orders) must match those of the parametersconf
- ConfigurationgradientView
- The flattened gradients array, as a view of the larger arrayCopyright © 2016. All Rights Reserved.