public class BackTrackLineSearch extends Object implements LineOptimizer
| Modifier and Type | Field and Description |
|---|---|
protected double |
ALF |
| Constructor and Description |
|---|
BackTrackLineSearch(Model optimizable,
ConvexOptimizer optimizer) |
BackTrackLineSearch(Model layer,
StepFunction stepFunction,
ConvexOptimizer optimizer) |
| Modifier and Type | Method and Description |
|---|---|
int |
getMaxIterations() |
double |
getStepMax() |
double |
optimize(org.nd4j.linalg.api.ndarray.INDArray parameters,
org.nd4j.linalg.api.ndarray.INDArray gradients,
org.nd4j.linalg.api.ndarray.INDArray searchDirection)
Line optimizer
|
void |
setAbsTolx(double tolx)
Sets the tolerance of absolute diff in function value.
|
void |
setMaxIterations(int maxIterations) |
void |
setRelTolx(double tolx)
Sets the tolerance of relative diff in function value.
|
double |
setScoreFor(org.nd4j.linalg.api.ndarray.INDArray parameters) |
void |
setStepMax(double stepMax) |
protected final double ALF
public BackTrackLineSearch(Model layer, StepFunction stepFunction, ConvexOptimizer optimizer)
layer - stepFunction - optimizer - public BackTrackLineSearch(Model optimizable, ConvexOptimizer optimizer)
optimizable - optimizer - public void setStepMax(double stepMax)
public double getStepMax()
public void setRelTolx(double tolx)
public void setAbsTolx(double tolx)
public int getMaxIterations()
public void setMaxIterations(int maxIterations)
public double setScoreFor(org.nd4j.linalg.api.ndarray.INDArray parameters)
public double optimize(org.nd4j.linalg.api.ndarray.INDArray parameters,
org.nd4j.linalg.api.ndarray.INDArray gradients,
org.nd4j.linalg.api.ndarray.INDArray searchDirection)
throws InvalidStepException
LineOptimizeroptimize in interface LineOptimizerparameters - the parameters to optimizegradients - the line/rate of changesearchDirection - the point for the line search to go inInvalidStepExceptionCopyright © 2016. All Rights Reserved.