mirror of
https://github.com/open-mmlab/mmcv.git
synced 2025-06-03 21:54:52 +08:00
[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
This commit is contained in:
parent
adc59b9f28
commit
826d3a7b68
@ -65,7 +65,7 @@ def infer_abbr(class_type):
|
||||
elif 'instance' in class_name:
|
||||
return 'in'
|
||||
else:
|
||||
return 'norm'
|
||||
return 'norm_layer'
|
||||
|
||||
|
||||
def build_norm_layer(cfg, num_features, postfix=''):
|
||||
|
@ -101,7 +101,7 @@ def test_infer_norm_abbr():
|
||||
class FancyNorm:
|
||||
pass
|
||||
|
||||
assert infer_norm_abbr(FancyNorm) == 'norm'
|
||||
assert infer_norm_abbr(FancyNorm) == 'norm_layer'
|
||||
|
||||
|
||||
def test_build_norm_layer():
|
||||
|
Loading…
x
Reference in New Issue
Block a user