Unverified Commit 826d3a7b authored by Rui Xu's avatar Rui Xu Committed by GitHub
Browse files

[Bug] Avoid recursion error when using customized norm layer without _abbr_ (#732)

* avoid recursion error when using customized norm layer without _abbr_

* fix unittest bug
parent adc59b9f
...@@ -65,7 +65,7 @@ def infer_abbr(class_type): ...@@ -65,7 +65,7 @@ def infer_abbr(class_type):
elif 'instance' in class_name: elif 'instance' in class_name:
return 'in' return 'in'
else: else:
return 'norm' return 'norm_layer'
def build_norm_layer(cfg, num_features, postfix=''): def build_norm_layer(cfg, num_features, postfix=''):
......
...@@ -101,7 +101,7 @@ def test_infer_norm_abbr(): ...@@ -101,7 +101,7 @@ def test_infer_norm_abbr():
class FancyNorm: class FancyNorm:
pass pass
assert infer_norm_abbr(FancyNorm) == 'norm' assert infer_norm_abbr(FancyNorm) == 'norm_layer'
def test_build_norm_layer(): def test_build_norm_layer():
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment