public abstract static class Optimizer.OptimizerBuilder<T extends Optimizer.OptimizerBuilder>
extends java.lang.Object
Optimizer
.Modifier | Constructor and Description |
---|---|
protected |
OptimizerBuilder() |
Modifier and Type | Method and Description |
---|---|
T |
optBeginNumUpdate(int beginNumUpdate)
Sets the initial value of the number of updates.
|
T |
optClipGrad(float clipGrad)
Sets the value of the \(clipGrad\).
|
T |
optWeightDecays(float weightDecays)
Sets the value of weight decay.
|
protected abstract T |
self() |
T |
setRescaleGrad(float rescaleGrad)
Sets the value used to rescale the gradient.
|
public T setRescaleGrad(float rescaleGrad)
rescaleGrad
- the value used to rescale the gradientBuilder
public T optWeightDecays(float weightDecays)
weightDecays
- the value of weight decay to be setBuilder
public T optClipGrad(float clipGrad)
\(grad = max(min(grad, clipGrad), -clipGrad)\)
clipGrad
- the value of \(clipGrad\)Builder
public T optBeginNumUpdate(int beginNumUpdate)
beginNumUpdate
- the initial value of the number of updatesBuilder
protected abstract T self()