public interface ConvexOptimizer extends Serializable
Modifier and Type | Method and Description |
---|---|
Map<String,org.nd4j.linalg.learning.AdaGrad> |
adaGradForVariables()
Return the ada grad look up table
|
int |
batchSize()
The batch size for the optimizer
|
org.nd4j.linalg.learning.AdaGrad |
getAdaGrad()
The adagrad in this model
|
org.nd4j.linalg.learning.AdaGrad |
getAdaGradForVariable(String variable)
Get adagrad for a variable
|
Pair<Gradient,Double> |
gradientAndScore()
The gradient and score for this optimizer
|
boolean |
optimize()
Calls optimize
|
void |
postStep()
After the step has been made, do an action
|
void |
preProcessLine(org.nd4j.linalg.api.ndarray.INDArray line)
Pre process 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 |
setupSearchState(Pair<Gradient,Double> pair)
Based on the gradient and score
setup a search state
|
void |
updateGradientAccordingToParams(Gradient gradient,
Model params,
int batchSize)
Update the gradient according to the configuration such as adagrad, momentum, and sparsity
|
void |
updateGradientAccordingToParams(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
|
double score()
Pair<Gradient,Double> gradientAndScore()
boolean optimize()
int batchSize()
void setBatchSize(int batchSize)
batchSize
- void preProcessLine(org.nd4j.linalg.api.ndarray.INDArray line)
line
- void postStep()
void setupSearchState(Pair<Gradient,Double> pair)
pair
- the gradient and scoreorg.nd4j.linalg.learning.AdaGrad getAdaGrad()
Map<String,org.nd4j.linalg.learning.AdaGrad> adaGradForVariables()
org.nd4j.linalg.learning.AdaGrad getAdaGradForVariable(String variable)
variable
- void updateGradientAccordingToParams(Gradient gradient, Model params, int batchSize)
gradient
- the gradient to modifyparams
- the parameters to updatevoid updateGradientAccordingToParams(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.