fix scope related naming issue in build_quant_conv_bn_relu, and also format function...
authorJerry Zhang <jerryzh@fb.com>
Thu, 31 Jan 2019 23:42:37 +0000 (15:42 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Thu, 31 Jan 2019 23:53:27 +0000 (15:53 -0800)
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

index 9011fed..445590f 100644 (file)
@@ -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.