mirror of
https://github.com/open-mmlab/mmengine.git
synced 2025-06-03 21:54:44 +08:00
[Fix] Fix error implementation of is_model_wrapper
(#640)
* [Fix] Fix is_model_wrapper * [Fix] Fix is_model_wrapper
This commit is contained in:
parent
0857f9fb40
commit
1bf5c0c12e
@ -26,5 +26,5 @@ def is_model_wrapper(model: nn.Module, registry: Registry = MODEL_WRAPPERS):
|
|||||||
if not registry.children:
|
if not registry.children:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
for child in registry.children.values():
|
return any(
|
||||||
return is_model_wrapper(model, child)
|
is_model_wrapper(model, child) for child in registry.children.values())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user