public class SimpleGDUpdateCalculator extends Object implements ParameterUpdateCalculator<SmoothParametrized,SimpleGDParameterUpdate>
Modifier and Type | Field and Description |
---|---|
protected IgniteFunction<Vector,IgniteDifferentiableVectorToDoubleFunction> |
loss
Loss function.
|
Constructor and Description |
---|
SimpleGDUpdateCalculator()
Construct instance of this class with default parameters.
|
SimpleGDUpdateCalculator(double learningRate)
Construct SimpleGDUpdateCalculator.
|
Modifier and Type | Method and Description |
---|---|
SimpleGDParameterUpdate |
calculateNewUpdate(SmoothParametrized mlp,
SimpleGDParameterUpdate updaterParameters,
int iteration,
Matrix inputs,
Matrix groundTruth)
Calculate new update.
|
SimpleGDParameterUpdate |
init(SmoothParametrized mdl,
IgniteFunction<Vector,IgniteDifferentiableVectorToDoubleFunction> loss)
Initializes the update calculator.
|
<M1 extends SmoothParametrized> |
update(M1 obj,
SimpleGDParameterUpdate update)
Update given obj with this parameters.
|
SimpleGDUpdateCalculator |
withLearningRate(double learningRate)
Create new instance of this class with same parameters as this one, but with new learning rate.
|
protected IgniteFunction<Vector,IgniteDifferentiableVectorToDoubleFunction> loss
public SimpleGDUpdateCalculator()
public SimpleGDUpdateCalculator(double learningRate)
learningRate
- Learning rate.public SimpleGDParameterUpdate init(SmoothParametrized mdl, IgniteFunction<Vector,IgniteDifferentiableVectorToDoubleFunction> loss)
init
in interface ParameterUpdateCalculator<SmoothParametrized,SimpleGDParameterUpdate>
mdl
- Model to be trained.loss
- Loss function.public SimpleGDParameterUpdate calculateNewUpdate(SmoothParametrized mlp, SimpleGDParameterUpdate updaterParameters, int iteration, Matrix inputs, Matrix groundTruth)
calculateNewUpdate
in interface ParameterUpdateCalculator<SmoothParametrized,SimpleGDParameterUpdate>
mlp
- Model to be updated.updaterParameters
- Updater parameters to updateCache.iteration
- Current trainer iteration.inputs
- Inputs.groundTruth
- True values.public <M1 extends SmoothParametrized> M1 update(M1 obj, SimpleGDParameterUpdate update)
update
in interface ParameterUpdateCalculator<SmoothParametrized,SimpleGDParameterUpdate>
obj
- Object to be updated.public SimpleGDUpdateCalculator withLearningRate(double learningRate)
learningRate
- Learning rate.
GridGain In-Memory Computing Platform : ver. 8.9.15 Release Date : December 3 2024