Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

Commit

Permalink
workaround bug (#70)
Browse files Browse the repository at this point in the history
  • Loading branch information
eugene123tw authored Oct 20, 2022
1 parent 938d74b commit d960005
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions mpa/det/trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@ def run(self, model_cfg, model_ckpt, data_cfg, **kwargs):
datasets = [build_dataset(cfg.data.train)]
cfg.data.val.samples_per_gpu = cfg.data.get('samples_per_gpu', 1)

# FIXME: scale_factors is fixed at 1 even batch_size > 1 in simple_test_mask
# Need to investigate, possibly due to OpenVINO
if 'roi_head' in model_cfg.model:
if 'mask_head' in model_cfg.model.roi_head:
cfg.data.val.samples_per_gpu = 1

if hasattr(cfg, 'hparams'):
if cfg.hparams.get('adaptive_anchor', False):
num_ratios = cfg.hparams.get('num_anchor_ratios', 5)
Expand Down

0 comments on commit d960005

Please sign in to comment.