未验证 提交 e3db65d5 编写于 作者: Z zhaoyingli 提交者: GitHub

fix dygraph adamw (#36745) (#36794)

上级 0b7f43ec
...@@ -333,7 +333,7 @@ class TestAdamWOpLayerwiseLR(TestAdamWOp): ...@@ -333,7 +333,7 @@ class TestAdamWOpLayerwiseLR(TestAdamWOp):
lr_ratio=simple_lr_fun) lr_ratio=simple_lr_fun)
loss_ref = np.array( loss_ref = np.array(
[4.8383293, 3.0854003, 1.33299, -0.418993, -2.171043]) [4.8383293, 3.084947, 1.3323904, -0.41943002, -2.1710064])
for i in range(5): for i in range(5):
a1 = linear1(a) a1 = linear1(a)
out = linear2(a1) out = linear2(a1)
......
...@@ -304,9 +304,8 @@ class AdamW(Adam): ...@@ -304,9 +304,8 @@ class AdamW(Adam):
moment1, moment2, beta1_pow_acc, beta2_pow_acc, master_weight, moment1, moment2, beta1_pow_acc, beta2_pow_acc, master_weight,
'epsilon', self._epsilon, 'lazy_mode', self._lazy_mode, 'epsilon', self._epsilon, 'lazy_mode', self._lazy_mode,
'min_row_size_to_use_multithread', 1000, 'beta1', _beta1, 'min_row_size_to_use_multithread', 1000, 'beta1', _beta1,
'beta2', _beta2, 'coeff', self._coeff, 'multi_precision', 'beta2', _beta2, "with_decay", with_decay, 'coeff', self._coeff,
find_master, 'lr_ratio', lr_ratio_) 'multi_precision', find_master, 'lr_ratio', lr_ratio_)
return None return None
inputs = { inputs = {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册