Skip to content
Snippets Groups Projects
Unverified Commit 1bf5c0c1 authored by Mashiro's avatar Mashiro Committed by GitHub
Browse files

[Fix] Fix error implementation of `is_model_wrapper` (#640)

* [Fix] Fix is_model_wrapper

* [Fix] Fix is_model_wrapper
parent 0857f9fb
No related branches found
No related tags found
No related merge requests found
......@@ -26,5 +26,5 @@ def is_model_wrapper(model: nn.Module, registry: Registry = MODEL_WRAPPERS):
if not registry.children:
return False
for child in registry.children.values():
return is_model_wrapper(model, child)
return any(
is_model_wrapper(model, child) for child in registry.children.values())
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment