Home
last modified time | relevance | path

Searched refs:dampening (Results 1 – 25 of 31) sorted by relevance

12

/third_party/mindspore/mindspore/nn/optim/
Dsgd.py139 …def __init__(self, params, learning_rate=0.1, momentum=0.0, dampening=0.0, weight_decay=0.0, neste… argument
152 if isinstance(dampening, int):
153 dampening = float(dampening)
154 if not isinstance(dampening, float):
157 if dampening < 0.0:
158 … raise ValueError("dampening should be at least 0.0, but got dampening {}".format(dampening))
159 self.dampening = dampening
166 if nesterov and (momentum <= 0.0 or dampening != 0.0):
168 "but got momentum {}, dampening {}".format(momentum, dampening))
171 self.opt = P.SGD(dampening, weight_decay, nesterov)
/third_party/mindspore/mindspore/core/ops/
Dsgd.cc21 void SGD::Init(const float dampening, const float weight_decay, const bool nesterov) { in Init() argument
23 set_dampening(dampening); in Init()
27 void SGD::set_dampening(const float dampening) { in set_dampening() argument
28 …if (get_nesterov()) CheckAndConvertUtils::CheckValue<float>(kDampening, dampening, kEqual, 0.0, na… in set_dampening()
29 (void)AddAttr(kDampening, MakeValue(dampening)); in set_dampening()
Dsgd.h38 …void Init(const float dampening = 0.0, const float weight_decay = 0.0, const bool nesterov = false…
40 void set_dampening(const float dampening);
/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/gpu/cuda_impl/
Dsgd_impl.cu21 __global__ void SGDKernel(const int size, const T dampening, const T weight_decay, const bool neste… in SGDKernel() argument
34 accum[i] = accum[i] * momentum[0] + (1.0 - dampening) * grad_new; in SGDKernel()
49 void SGD(const int size, const T dampening, const T weight_decay, const bool nesterov, const T *lr,… in SGD() argument
51 …SGDKernel<<<GET_BLOCKS(size), GET_THREADS, 0, cuda_stream>>>(size, dampening, weight_decay, nester… in SGD()
55 template void SGD(const int size, const float dampening, const float weight_decay, const bool neste…
Dsgd_impl.cuh23 void SGD(const int size, const T dampening, const T weight_decay, const bool nesterov, const T *lr,…
/third_party/mindspore/tests/st/ops/gpu/
Dtest_sgd_op.py51 dampening = 0.0
56 … = SGD(filter(lambda x: x.requires_grad, net.get_parameters()), learning_rate, momentum, dampening,
/third_party/mindspore/tests/st/ops/cpu/
Dtest_sgd_op.py51 dampening = 0.0
56 … = SGD(filter(lambda x: x.requires_grad, net.get_parameters()), learning_rate, momentum, dampening,
/third_party/mindspore/tests/ut/python/nn/optim/
Dtest_optimizer.py67 … SGD(params, learning_rate=0.1, momentum=-0.1, dampening=0, weight_decay=0, nesterov=False)
69 … SGD(params, learning_rate=0.12, momentum=-0.1, dampening=0, weight_decay=0, nesterov=False)
/third_party/mindspore/mindspore/lite/src/runtime/kernel/arm/fp32_grad/
Dsgd.cc33 …ight, float *accumulate, const float *gradient, float learning_rate, float dampening, float moment, in DoSgd() argument
38 accumulate[i] = accumulate[i] * moment + gradient[i] * (1.f - dampening); in DoSgd()
43 accumulate[i] = accumulate[i] * moment + gradient[i] * (1.f - dampening); in DoSgd()
/third_party/mindspore/mindspore/lite/examples/export_models/models/
Deffnet_train_export.py29 optimizer = nn.SGD(n.trainable_params(), learning_rate=0.01, momentum=0.9, dampening=0.0, weight_de…
Dnin_train_export.py29 optimizer = nn.SGD(n.trainable_params(), learning_rate=0.01, momentum=0.9, dampening=0.0, weight_de…
Dxception_train_export.py32 optimizer = nn.SGD(n.trainable_params(), learning_rate=0.01, momentum=0.9, dampening=0.0, weight_de…
Ddensenet_train_export.py32 optimizer = nn.SGD(n.trainable_params(), learning_rate=0.001, momentum=0.9, dampening=0.0, weight_d…
Dgooglenet_train_export.py29 optimizer = nn.SGD(n.trainable_params(), learning_rate=0.01, momentum=0.9, dampening=0.0, weight_de…
Dmobilenetv1_train_export.py29 optimizer = nn.SGD(n.trainable_params(), learning_rate=1e-2, momentum=0.9, dampening=0.1, weight_de…
Dresnet_train_export.py30 optimizer = nn.SGD(n.trainable_params(), learning_rate=0.01, momentum=0.9, dampening=0.0, weight_de…
Deffnet_tune_train_export.py60 dampening=0.01, weight_decay=0.0, nesterov=False, loss_scale=1.0)
/third_party/mindspore/mindspore/lite/examples/transfer_learning/model/
Dtransfer_learning_export.py53 dampening=0.01, weight_decay=0.0, nesterov=False, loss_scale=1.0)
/third_party/mindspore/mindspore/ccsrc/transform/graph_ir/op_declare/
Dnn_training_ops_declare.cc144 ATTR_MAP(SGD) = {{"dampening", ATTR_DESC(dampening, AnyTraits<float>())},
/third_party/mindspore/mindspore/lite/src/train/
Dtrain_populate_parameter.cc140 p->dampening_ = value->dampening(); in PopulateSgdParameter()
Dtrain_populate_parameter_v0.cc219 p->dampening_ = sgd_prim->dampening(); in PopulateSgdParameter()
/third_party/mindspore/mindspore/lite/schema/
Dops.fbs882 dampening: float;
Dops_v0.fbs968 dampening: float;
Dops_v0_generated.h9895 float dampening() const { in dampening() function
9917 void add_dampening(float dampening) { in add_dampening()
9918 fbb_.AddElement<float>(Sgd::VT_DAMPENING, dampening, 0.0f); in add_dampening()
9937 float dampening = 0.0f,
9940 builder_.add_dampening(dampening);
/third_party/mindspore/mindspore/lite/src/ops/
Dops_def.cc882 OP_ATTR(dampening, float)

12