Class SGD
Defined in File sgd.h
Inheritance Relationships
Base Type
public mindspore::ops::BaseOperator
Class Documentation
-
class SGD : public mindspore::ops::BaseOperator
Computes the stochastic gradient descent. Refer to Python API mindspore.ops.SGD for more details.
Public Functions
-
inline SGD()
Constructor.
-
void Init(const float dampening = 0.0, const float weight_decay = 0.0, const bool nesterov = false)
Init. Refer to the parameters of Python API mindspore.ops.SGD for the inputs.
-
void set_dampening(const float dampening)
Set dampening.
-
void set_weight_decay(const float weight_decay)
Set weight_decay.
-
void set_nesterov(const bool nesterov)
Set nesterov.
-
float get_dampening() const
Get dampening.
- Returns
dampening.
-
float get_weight_decay() const
Get weight_decay.
- Returns
weight_decay.
-
bool get_nesterov() const
Get nesterov.
- Returns
nesterov.
-
inline SGD()