Home
last modified time | relevance | path

Searched refs:grad_new (Results 1 – 2 of 2) sorted by relevance

/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/gpu/cuda_impl/
Dsgd_impl.cu24 T grad_new = grad[i]; in SGDKernel() local
26 grad_new += param[i] * weight_decay; in SGDKernel()
31 accum[i] = grad_new; in SGDKernel()
34 accum[i] = accum[i] * momentum[0] + (1.0 - dampening) * grad_new; in SGDKernel()
38 grad_new += accum[i] * momentum[0]; in SGDKernel()
40 grad_new = accum[i]; in SGDKernel()
44 param[i] -= lr[0] * grad_new; in SGDKernel()
/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/cpu/
Dsgd_cpu_kernel.cc54 T grad_new = grad[i]; in Launch() local
56 grad_new += param[i] * static_cast<T>(weight_decay_); in Launch()
60 accum[i] = grad_new; in Launch()
63 accum[i] = accum[i] * momentum[0] + (ONE - static_cast<T>(dampening_)) * grad_new; in Launch()
66 grad_new += accum[i] * momentum[0]; in Launch()
68 grad_new = accum[i]; in Launch()
71 param[i] -= lr[0] * grad_new; in Launch()