提交 8a016442 编写于 作者: Y Yu Yang 提交者: GitHub

Merge pull request #1752 from qingqing01/v2_api_fix

fix parameter shape in v2
......@@ -159,7 +159,8 @@ class Parameters(object):
if not self.has_key(key):
raise ValueError("No such parameter %s" % key)
conf = self.__param_conf__[key]
return tuple(map(int, conf.dims))
dims = conf.dims if conf.dims else (1, conf.size)
return tuple(map(int, dims))
def __setitem__(self, key, value):
"""
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册