Skip to content

Commit

Permalink
Merge pull request #1752 from qingqing01/v2_api_fix
Browse files Browse the repository at this point in the history
fix parameter shape in v2
  • Loading branch information
reyoung authored Apr 7, 2017
2 parents d94e1f5 + e6246b4 commit 8a01644
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion python/paddle/v2/parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,8 @@ def get_shape(self, key):
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):
"""
Expand Down

0 comments on commit 8a01644

Please sign in to comment.