public class GradientAdjustment extends Object
Modifier and Type | Method and Description |
---|---|
static void |
updateGradientAccordingToParams(NeuralNetConfiguration conf,
int iteration,
org.nd4j.linalg.learning.AdaGrad adaGrad,
org.nd4j.linalg.api.ndarray.INDArray gradient,
org.nd4j.linalg.api.ndarray.INDArray params,
int batchSize)
Update the gradient according to the configuration such as adagrad, momentum, and sparsity
|
static void |
updateGradientAccordingToParams(NeuralNetConfiguration conf,
int iteration,
Gradient gradient,
int batchSize,
Map<String,org.nd4j.linalg.learning.AdaGrad> adaGrad,
Model model)
Updates each variable wrt its gradient
|
public static void updateGradientAccordingToParams(NeuralNetConfiguration conf, int iteration, Gradient gradient, int batchSize, Map<String,org.nd4j.linalg.learning.AdaGrad> adaGrad, Model model)
conf
- the configurationiteration
- the iterationgradient
- the gradients for the variablesbatchSize
- the batch size of the inputadaGrad
- the adagrad map (per variable adagrad entries(model
- the model to usepublic static void updateGradientAccordingToParams(NeuralNetConfiguration conf, int iteration, org.nd4j.linalg.learning.AdaGrad adaGrad, org.nd4j.linalg.api.ndarray.INDArray gradient, org.nd4j.linalg.api.ndarray.INDArray params, int batchSize)
gradient
- the gradient to modifyCopyright © 2015. All Rights Reserved.