public interface ConvexOptimizer
extends java.io.Serializable
Modifier and Type | Method and Description |
---|---|
int |
batchSize()
The batch size for the optimizer
|
boolean |
checkTerminalConditions(org.nd4j.linalg.api.ndarray.INDArray gradient,
double oldScore,
double score,
int iteration)
Check termination conditions
setup a search state
|
ComputationGraphUpdater |
getComputationGraphUpdater() |
NeuralNetConfiguration |
getConf() |
Updater |
getUpdater() |
Pair<Gradient,java.lang.Double> |
gradientAndScore()
The gradient and score for this optimizer
|
boolean |
optimize()
Calls optimize
|
void |
postStep(org.nd4j.linalg.api.ndarray.INDArray line)
After the step has been made, do an action
|
void |
preProcessLine()
Pre preProcess a line before an iteration
|
double |
score()
The score for the optimizer so far
|
void |
setBatchSize(int batchSize)
Set the batch size for the optimizer
|
void |
setListeners(java.util.Collection<IterationListener> listeners) |
void |
setUpdater(Updater updater) |
void |
setUpdaterComputationGraph(ComputationGraphUpdater updater) |
void |
setupSearchState(Pair<Gradient,java.lang.Double> pair)
Based on the gradient and score
setup a search state
|
void |
updateGradientAccordingToParams(Gradient gradient,
Model model,
int batchSize)
Update the gradient according to the configuration such as adagrad, momentum, and sparsity
|
double score()
Updater getUpdater()
ComputationGraphUpdater getComputationGraphUpdater()
void setUpdater(Updater updater)
void setUpdaterComputationGraph(ComputationGraphUpdater updater)
void setListeners(java.util.Collection<IterationListener> listeners)
NeuralNetConfiguration getConf()
Pair<Gradient,java.lang.Double> gradientAndScore()
boolean optimize()
int batchSize()
void setBatchSize(int batchSize)
batchSize
- void preProcessLine()
void postStep(org.nd4j.linalg.api.ndarray.INDArray line)
line
- void setupSearchState(Pair<Gradient,java.lang.Double> pair)
pair
- the gradient and scorevoid updateGradientAccordingToParams(Gradient gradient, Model model, int batchSize)
gradient
- the gradient to modifymodel
- the model with the parameters to updatebatchSize
- batchSize for updateboolean checkTerminalConditions(org.nd4j.linalg.api.ndarray.INDArray gradient, double oldScore, double score, int iteration)
gradient
- layer gradientsiteration
- what iteration the optimizer is on