未验证 提交 fce342dc 编写于 作者: K Kaipeng Deng 提交者: GitHub

fix mixup error when dataset has only 1 sample (#101)

* fix mixup error when dataset has only 1 sample

* refine log
上级 497e0e27
......@@ -28,6 +28,9 @@ import copy
import pickle as pkl
from ..dataset import Dataset
import logging
logger = logging.getLogger(__name__)
class RoiDbSource(Dataset):
""" interface to load roidb data from files
......@@ -134,6 +137,11 @@ class RoiDbSource(Dataset):
if self._is_shuffle:
random.shuffle(self._roidb)
if self._mixup_epoch > 0 and self._samples < 2:
logger.info("Disable mixup for dataset samples "
"less than 2 samples")
self._mixup_epoch = -1
if self._epoch < 0:
self._epoch = 0
else:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册