public interface GradientUpdater extends Serializable
Modifier and Type | Method and Description |
---|---|
GradientUpdater |
clone() |
void |
setup(int d)
Sets up this updater to update a weight vector of dimension
d
by a gradient of the same dimension |
void |
update(Vec w,
Vec grad,
double eta)
Updates the weight vector
x such that x = x-ηf(grad),
where f(grad) is some function on the gradient that effectively returns a
new vector. |
double |
update(Vec w,
Vec grad,
double eta,
double bias,
double biasGrad)
Updates the weight vector
x such that x = x-ηf(grad),
where f(grad) is some function on the gradient that effectively returns a
new vector. |
void update(Vec w, Vec grad, double eta)
x
such that x = x-ηf(grad),
where f(grad) is some function on the gradient that effectively returns a
new vector. It is not necessary for the internal implementation to ever
explicitly form any of these objects, so long as x
is mutated to
have the correct result.w
- the vector to mutate such that is has been updated by the
gradientgrad
- the gradient to update the weight vector x
frometa
- the learning rate to applydouble update(Vec w, Vec grad, double eta, double bias, double biasGrad)
x
such that x = x-ηf(grad),
where f(grad) is some function on the gradient that effectively returns a
new vector. It is not necessary for the internal implementation to ever
explicitly form any of these objects, so long as x
is mutated to
have the correct result. w
- the vector to mutate such that is has been updated by the
gradientgrad
- the gradient to update the weight vector x
frometa
- the learning rate to applybias
- the bias term of the vectorbiasGrad
- the gradient for the bias termbias = bias - returnValue
void setup(int d)
d
by a gradient of the same dimensiond
- the dimension of the weight vector that will be updatedGradientUpdater clone()
Copyright © 2017. All rights reserved.