You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by jx...@apache.org on 2017/09/21 18:43:31 UTC
[incubator-mxnet] branch master updated: more informative error
message for deferred init (#7976)
This is an automated email from the ASF dual-hosted git repository.
jxie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git
The following commit(s) were added to refs/heads/master by this push:
new 812ee67 more informative error message for deferred init (#7976)
812ee67 is described below
commit 812ee6714c3763211f956f90e3cc92745e0efe90
Author: Sheng Zha <sz...@users.noreply.github.com>
AuthorDate: Thu Sep 21 11:43:29 2017 -0700
more informative error message for deferred init (#7976)
---
python/mxnet/gluon/parameter.py | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/python/mxnet/gluon/parameter.py b/python/mxnet/gluon/parameter.py
index 4bc2611..06ffe3d 100644
--- a/python/mxnet/gluon/parameter.py
+++ b/python/mxnet/gluon/parameter.py
@@ -146,7 +146,12 @@ class Parameter(object):
"It was only initialized on %s."%(
self.name, str(ctx), str(self._ctx_list)))
if self._deferred_init:
- raise DeferredInitializationError
+ raise DeferredInitializationError(
+ "Parameter %s has not been initialized yet because initialization was " \
+ "deferred. Actual initialization happens during the first forward pass. " \
+ "Please pass one batch of data through the network before accessing Parameters. " \
+ "You can also avoid deferred initialization by specifying in_units, " \
+ "num_features, etc., for network layers."%(self.name))
raise RuntimeError(
"Parameter %s has not been initialized. Note that " \
"you should initialize parameters and create Trainer " \
--
To stop receiving notification emails like this one, please contact
['"commits@mxnet.apache.org" <co...@mxnet.apache.org>'].