mmpretrain icon indicating copy to clipboard operation
mmpretrain copied to clipboard

BatchCutMixLayer和BatchMixupLayer中,prob并没有起到作用,所有数据100%被cutmix和mixup

Open BokyLiu opened this issue 2 years ago • 3 comments

https://github.com/open-mmlab/mmclassification/blob/d2e505415040bf5329ab218bb6fe3d899f176cd5/mmcls/models/utils/augment/mixup.py#L80

https://github.com/open-mmlab/mmclassification/blob/d2e505415040bf5329ab218bb6fe3d899f176cd5/mmcls/models/utils/augment/cutmix.py#L175

是不是应该有,如:

if random<self.prob:
    return img, gt_label
else:
   return self.cutmix(img, gt_label)

BokyLiu avatar Jun 17 '22 03:06 BokyLiu

We recommend using English or English & Chinese for issues so that we could have broader discussion.

mm-assistant[bot] avatar Jun 17 '22 03:06 mm-assistant[bot]

是这样的,这里的 prob 只是用作记录概率,随机选取是在 https://github.com/open-mmlab/mmclassification/blob/master/mmcls/models/utils/augment/augments.py 中进行的。 后续我们会对这块的逻辑进行重构

mzr1996 avatar Jun 17 '22 03:06 mzr1996

了解了,这里的prob代表选择Augments中某一个策略的概率

BokyLiu avatar Jun 17 '22 03:06 BokyLiu