Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
Add parameter name to AssertionError for deferred shape inference (#1…
Browse files Browse the repository at this point in the history
  • Loading branch information
RuRo authored Jun 18, 2020
1 parent 9591436 commit 14aeb38
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/mxnet/gluon/parameter.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,8 @@ def shape(self, new_shape):

assert len(self._shape) == len(new_shape) and \
all(j in (-1, 0, i) for i, j in zip(new_shape, self._shape)), \
"Expected shape %s is incompatible with given shape %s."%(
str(new_shape), str(self._shape)) # -1 means unknown dim size in np_shape mode
"Expected shape %s is incompatible with given shape %s for Parameter %s."%(
str(new_shape), str(self._shape), str(self.name)) # -1 means unknown dim size in np_shape mode

self._shape = new_shape

Expand Down

0 comments on commit 14aeb38

Please sign in to comment.