未验证 提交 0675971d 编写于 作者: T Tingquan Gao 提交者: GitHub

rm fluid api (#2907)

上级 962c540c
......@@ -310,8 +310,9 @@ class AdamW(object):
if self.one_dim_param_no_weight_decay:
self.no_weight_decay_param_name_list += [
p.name for model in model_list
for n, p in model.named_parameters() if len(p.shape) == 1
p.name
for model in model_list for n, p in model.named_parameters()
if len(p.shape) == 1
] if model_list else []
opt = optim.AdamW(
......@@ -374,7 +375,7 @@ class AdamWDL(object):
name_dict=None,
name=None):
if not isinstance(layerwise_decay, float) and \
not isinstance(layerwise_decay, fluid.framework.Variable):
not isinstance(layerwise_decay, paddle.static.Variable):
raise TypeError("coeff should be float or Tensor.")
self.layerwise_decay = layerwise_decay
self.name_dict = name_dict
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册