Skip to content

Commit

Permalink
add doc for
Browse files Browse the repository at this point in the history
  • Loading branch information
marsggbo committed May 21, 2022
1 parent d0b147c commit 91dcd04
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions hyperbox/mutator/default_mutator.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ def __init__(self, model):

@lazy_property
def has_duplicate_mutable(self):
'''check if the model has duplicate mutable
e.g., in DARTS, different cells share the same mutable as the edges use the same key,
but only the mask of the last cell will be updated by `reset`.
To avoid this case, you should use `sync_mask_to_duplicate_mutables` to sync the mask to the duplicate mutables.
more details can be found in `reset`.
'''
mutable_keys = set()
for name, module in self.model.named_modules():
if isinstance(module, spaces.Mutable):
Expand Down

0 comments on commit 91dcd04

Please sign in to comment.