fix to work with num_workers=0

This commit is contained in:
Kohya S
2023-03-28 19:42:47 +09:00
parent 99eaf1fd65
commit 4f70e5dca6
5 changed files with 27 additions and 13 deletions

View File

@@ -65,7 +65,8 @@ def train(args):
current_epoch = Value("i", 0)
current_step = Value("i", 0)
collater = train_util.collater_class(current_epoch, current_step)
ds_for_collater = train_dataset_group if args.max_data_loader_n_workers == 0 else None
collater = train_util.collater_class(current_epoch, current_step, ds_for_collater)
if args.debug_dataset:
train_util.debug_dataset(train_dataset_group)