Class ApplyMomentum

Inheritance Relationships

Base Type

  • public mindspore::ops::BaseOperator

Class Documentation

class ApplyMomentum : public mindspore::ops::BaseOperator

Optimizer that implements the Momentum algorithm. Refer to Python API mindspore.ops.ApplyMomentum for more details.

Public Functions

inline ApplyMomentum()

Constructor.

void Init(const bool use_nesterov = false, const bool use_locking = false, const float gradient_scale = 1.0)

Init. Refer to the parameters of Python API mindspore.ops.ApplyMomentum for the inputs.

void set_use_nesterov(const bool use_nesterov)

Set use_nesterov.

void set_use_locking(const bool use_locking)

Set use_locking.

void set_gradient_scale(const float gradient_scale)

Set gradient_scale.

bool get_use_nesterov() const

Get use_nesterov.

Returns

use_nesterov.

bool get_use_locking() const

Get use_locking.

Returns

use_locking.

float get_gradient_scale() const

Get gradient_scale.

Returns

gradient_scale.