Skip to content

Commit

Permalink
Fix dataset length bug in mpa task (#1338)
Browse files Browse the repository at this point in the history
* Fix dataset length bug in mpa task
* Removed duplicated configure query
Signed-off-by: Songki Choi <songki.choi@intel.com>
  • Loading branch information
goodsong81 authored Nov 7, 2022
1 parent 6b0c0ec commit d6ad2ce
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def _run_task(self, stage_module, mode=None, dataset=None, parameters=None, **kw
if dataset is not None:
train_data_cfg = Stage.get_train_data_cfg(self._data_cfg)
# if dataset size is smaller than batch size
if (len(train_data_cfg.get('ote_dataset', [])) < self._recipe_cfg.data.get('samples_per_gpu', 2)):
if 0 < len(dataset) < self._recipe_cfg.data.get('samples_per_gpu', 2):
train_data_cfg.drop_last = False
train_data_cfg['data_classes'] = data_classes
new_classes = np.setdiff1d(data_classes, model_classes).tolist()
Expand Down

0 comments on commit d6ad2ce

Please sign in to comment.