Class StochasticGradientDescent
- java.lang.Object
-
- org.deeplearning4j.optimize.solvers.BaseOptimizer
-
- org.deeplearning4j.optimize.solvers.StochasticGradientDescent
-
- All Implemented Interfaces:
Serializable,ConvexOptimizer
public class StochasticGradientDescent extends BaseOptimizer
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.deeplearning4j.optimize.solvers.BaseOptimizer
accumulator, computationGraphUpdater, conf, GRADIENT_KEY, lineMaximizer, log, model, oldScore, PARAMS_KEY, score, SCORE_KEY, SEARCH_DIR, searchState, step, stepFunction, stepMax, trainingListeners, updater
-
-
Constructor Summary
Constructors Constructor Description StochasticGradientDescent(NeuralNetConfiguration conf, StepFunction stepFunction, Collection<TrainingListener> trainingListeners, Model model)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanoptimize(LayerWorkspaceMgr workspaceMgr)Optimize call.voidpostStep(INDArray gradient)Post step to update searchDirection with new gradient and parameter informationvoidpreProcessLine()Pre preProcess to setup initial searchDirection approximation-
Methods inherited from class org.deeplearning4j.optimize.solvers.BaseOptimizer
applyConstraints, batchSize, getComputationGraphUpdater, getComputationGraphUpdater, getConf, getDefaultStepFunctionForOptimizer, getEpochCount, getGradientsAccumulator, getIterationCount, getUpdater, getUpdater, gradientAndScore, incrementIterationCount, postFirstStep, score, setBatchSize, setGradientsAccumulator, setListeners, setUpdater, setUpdaterComputationGraph, setupSearchState, updateGradientAccordingToParams
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.deeplearning4j.optimize.api.ConvexOptimizer
getStepFunction
-
-
-
-
Constructor Detail
-
StochasticGradientDescent
public StochasticGradientDescent(NeuralNetConfiguration conf, StepFunction stepFunction, Collection<TrainingListener> trainingListeners, Model model)
-
-
Method Detail
-
optimize
public boolean optimize(LayerWorkspaceMgr workspaceMgr)
Description copied from class:BaseOptimizerOptimize call. This runs the optimizer.- Specified by:
optimizein interfaceConvexOptimizer- Overrides:
optimizein classBaseOptimizer- Returns:
- whether it converged or not
-
preProcessLine
public void preProcessLine()
Description copied from class:BaseOptimizerPre preProcess to setup initial searchDirection approximation- Specified by:
preProcessLinein interfaceConvexOptimizer- Overrides:
preProcessLinein classBaseOptimizer
-
postStep
public void postStep(INDArray gradient)
Description copied from class:BaseOptimizerPost step to update searchDirection with new gradient and parameter information- Specified by:
postStepin interfaceConvexOptimizer- Overrides:
postStepin classBaseOptimizer
-
-