diff options
author | Yan Zhu <yzhu@fb.com> | 2018-02-14 10:48:50 -0800 |
---|---|---|
committer | Facebook Github Bot <facebook-github-bot@users.noreply.github.com> | 2018-02-14 11:10:51 -0800 |
commit | 0a66c76a4c35deab6fa305a9ecb1a5eb77f89dad (patch) | |
tree | 5f8990c5f776c7e24a193ba2916d34055be5e773 | |
parent | c784a273bc832aefdde0af10b3fd55b68200e573 (diff) | |
download | pytorch-0a66c76a4c35deab6fa305a9ecb1a5eb77f89dad.tar.gz pytorch-0a66c76a4c35deab6fa305a9ecb1a5eb77f89dad.tar.bz2 pytorch-0a66c76a4c35deab6fa305a9ecb1a5eb77f89dad.zip |
detailed error output for parameter sharing
Reviewed By: xianjiec
Differential Revision: D6986239
fbshipit-source-id: 5b8bb06ea2383ce64318b5322bda7a58469f3eb0
-rw-r--r-- | caffe2/python/layer_model_helper.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/caffe2/python/layer_model_helper.py b/caffe2/python/layer_model_helper.py index 00c9d34d84..388bb0d939 100644 --- a/caffe2/python/layer_model_helper.py +++ b/caffe2/python/layer_model_helper.py @@ -213,8 +213,9 @@ class LayerModelHelper(model_helper.ModelHelper): if shape != ref_shape: raise ValueError( "Got inconsistent shapes between shared parameters " - "when trying to map a blob in scope {0} to {1}.".format( - scope.CurrentNameScope(), param_name) + "when trying to map a blob in scope {0} to {1}. ref_shape : " + " {2}, shape : {3}".format( + scope.CurrentNameScope(), param_name, ref_shape, shape) ) def create_param(self, param_name, shape, initializer, optimizer=None, |