Skip to content

Commit

Permalink
Change samples_per_gpu in _infer_model(Detection) (#2041)
Browse files Browse the repository at this point in the history
Change samples_per_gpu in _infer_model
  • Loading branch information
jaegukhyun authored Apr 20, 2023
1 parent ad0c960 commit 0d3002a
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions otx/algorithms/detection/adapters/mmdet/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,10 +320,7 @@ def _infer_model(
cfg = self.configure(False, "test", None)
logger.info("infer!")

samples_per_gpu = cfg.data.test_dataloader.get("samples_per_gpu", 1)
if samples_per_gpu > 1:
# Replace 'ImageToTensor' to 'DefaultFormatBundle'
cfg.data.test.pipeline = replace_ImageToTensor(cfg.data.test.pipeline)
samples_per_gpu = 1

# Data loader
mm_dataset = build_dataset(cfg.data.test)
Expand Down

0 comments on commit 0d3002a

Please sign in to comment.