Skip to content

Commit

Permalink
num_worker default value
Browse files Browse the repository at this point in the history
  • Loading branch information
MeowZheng committed Jul 3, 2022
1 parent a11e963 commit ae6b61a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mmflow/utils/set_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ def setup_multi_processes(cfg):
logger.info(f'OpenCV num_threads is `{cv2.getNumThreads()}')

if cfg.data.get('train_dataloader') is not None:
workers_per_gpu = cfg.data.train_dataloader.get('workers_per_gpu', 1)
workers_per_gpu = cfg.data.train_dataloader.get('workers_per_gpu', 0)
elif cfg.data.get('test_dataloader') is not None:
workers_per_gpu = cfg.data.test_dataloader.get('workers_per_gpu', 1)
workers_per_gpu = cfg.data.test_dataloader.get('workers_per_gpu', 0)
else:
workers_per_gpu = 0
if workers_per_gpu > 1:
Expand Down

0 comments on commit ae6b61a

Please sign in to comment.