Skip to content
Snippets Groups Projects
Commit 5c2e68bb authored by simon wu's avatar simon wu Committed by Kai Chen
Browse files

Support different type of dataset for training (#1133)

parent 8f7507eb
No related branches found
No related tags found
No related merge requests found
...@@ -28,7 +28,9 @@ def _concat_dataset(cfg, default_args=None): ...@@ -28,7 +28,9 @@ def _concat_dataset(cfg, default_args=None):
def build_dataset(cfg, default_args=None): def build_dataset(cfg, default_args=None):
if cfg['type'] == 'RepeatDataset': if isinstance(cfg, (list, tuple)):
dataset = ConcatDataset([build_dataset(c, default_args) for c in cfg])
elif cfg['type'] == 'RepeatDataset':
dataset = RepeatDataset( dataset = RepeatDataset(
build_dataset(cfg['dataset'], default_args), cfg['times']) build_dataset(cfg['dataset'], default_args), cfg['times'])
elif isinstance(cfg['ann_file'], (list, tuple)): elif isinstance(cfg['ann_file'], (list, tuple)):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment