提交 f6575616 编写于 作者: M mindspore-ci-bot 提交者: Gitee

!2621 fix group params not list

Merge pull request !2621 from lilei/fix
......@@ -262,6 +262,10 @@ class Optimizer(Cell):
if not group_param['params']:
raise ValueError("Optimizer got an empty group parameter list.")
for param in group_param['params']:
if not isinstance(param, Parameter):
raise TypeError("The group param should be an iterator of Parameter type.")
def _parse_group_params(self, parameters, learning_rate):
"""Parse group params."""
self._check_group_params(parameters)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册