Skip to content

Commit

Permalink
fix_darts_loop
Browse files Browse the repository at this point in the history
  • Loading branch information
humu789 committed Jul 27, 2022
1 parent 6987511 commit 0d4f3fc
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions mmrazor/engine/runner/darts_loop.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,14 @@ def __init__(self,
mutator_dataloader, seed=runner.seed)
else:
self.mutator_dataloader = mutator_dataloader
multi_loaders = [self.dataloader, self.mutator_dataloader]
self.multi_loaders = EpochMultiLoader(multi_loaders)
self.multi_loaders = [self.dataloader, self.mutator_dataloader]

def run_epoch(self) -> None:
"""Iterate one epoch."""
self.runner.call_hook('before_train_epoch')
self.runner.model.train()

for idx, data_batch in enumerate(self.multi_loaders):
for idx, data_batch in enumerate(EpochMultiLoader(self.multi_loaders)):
self.run_iter(idx, data_batch)

self.runner.call_hook('after_train_epoch')
Expand Down

0 comments on commit 0d4f3fc

Please sign in to comment.