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
This commit is contained in:
Jerry Zhang
2019-01-31 15:42:37 -08:00
committed by Facebook Github Bot
parent 51752e09c6
commit d5d7718770

View 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.