From d5d7718770ccc7499f87f56fa79184f5eb97f9d1 Mon Sep 17 00:00:00 2001 From: Jerry Zhang Date: Thu, 31 Jan 2019 15:42:37 -0800 Subject: [PATCH] fix scope related naming issue in build_quant_conv_bn_relu, and also format function signature Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/14885 Reviewed By: harouwu Differential Revision: D13374077 fbshipit-source-id: 5082c4ea0d2fdc197243b022b9b489f38b04c8e9 --- caffe2/python/core.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/caffe2/python/core.py b/caffe2/python/core.py index 9011fed..445590f 100644 --- a/caffe2/python/core.py +++ b/caffe2/python/core.py @@ -239,6 +239,9 @@ class BlobReference(object): def GetNameScope(self): return self._name[:self._name.rfind(scope._NAMESCOPE_SEPARATOR) + 1] + def GetUnscopedName(self): + return self._name[self._name.rfind(scope._NAMESCOPE_SEPARATOR) + 1:] + def _CreateAndAddToNet(self, op_type, inputs=None, *args, **kwargs): """Internal function that routes the operator generation to the network's __getattr__ function. -- 2.7.4