Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
RunningLeon committed Aug 18, 2022
1 parent 54e3aad commit fa95ac6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 2 additions & 1 deletion mmdeploy/codebase/base/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def init_pytorch_model(self,
def build_dataset(self,
dataset_cfg: Union[str, mmcv.Config],
dataset_type: str = 'val',
is_sort_dataset: bool = True,
is_sort_dataset: bool = False,
**kwargs) -> Dataset:
"""Build dataset for different codebase.
Expand All @@ -80,6 +80,7 @@ def build_dataset(self,
is_sort_dataset (bool): When 'True', the dataset will be sorted
by image shape in ascending order if 'dataset_cfg'
contains information about height and width.
Default is `False`.
Returns:
Dataset: The built dataset.
Expand Down
4 changes: 1 addition & 3 deletions tools/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,7 @@ def main():

# prepare the dataset loader
dataset_type = 'test'

dataset = task_processor.build_dataset(
model_cfg, dataset_type, is_sort_dataset=False)
dataset = task_processor.build_dataset(model_cfg, dataset_type)
# override samples_per_gpu that used for training
model_cfg.data['samples_per_gpu'] = args.batch_size
data_loader = task_processor.build_dataloader(
Expand Down

0 comments on commit fa95ac6

Please sign in to comment.