Skip to content
Snippets Groups Projects
Unverified Commit c181f119 authored by i-robot's avatar i-robot Committed by Gitee
Browse files

!3920 optimize yolov3 dataset perf

Merge pull request !3920 from luoyang/mymaster
parents 6cf13db5 897c7c48
No related branches found
No related tags found
No related merge requests found
......@@ -170,7 +170,8 @@ def create_yolo_dataset(image_dir, anno_path, batch_size, device_num, rank,
dataset = ds.GeneratorDataset(yolo_dataset, column_names=dataset_column_names, sampler=distributed_sampler)
dataset = dataset.map(operations=ds.vision.Decode(), input_columns=["image"])
dataset = dataset.batch(batch_size, per_batch_map=multi_scale_trans, input_columns=dataset_column_names,
num_parallel_workers=min(32, num_parallel_workers), drop_remainder=True)
num_parallel_workers=min(32, num_parallel_workers), drop_remainder=True,
python_multiprocessing=True)
else:
dataset = ds.GeneratorDataset(yolo_dataset, column_names=dataset_column_names, sampler=distributed_sampler)
dataset = dataset.map(operations=ds.vision.Decode(), input_columns=["image"])
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment