Update build.py

训练过程中,内存一直增长,到后期会把整个服务器的内存都占完,初步分析将上述两个增强关闭后,内存使用会正常,具体是因为哪个方法,因为哪个实现有问题,暂时还没有时间分析
pull/674/head
rrjia 2022-07-28 17:48:27 +08:00 committed by GitHub
parent 4508251d74
commit 9b656c3da2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -80,13 +80,13 @@ def build_transforms(cfg, is_train=True):
if do_affine:
res.append(T.RandomAffine(degrees=10, translate=None, scale=[0.9, 1.1], shear=0.1, resample=False,
fillcolor=0))
if do_augmix:
res.append(AugMix(prob=augmix_prob))
# if do_augmix:
# res.append(AugMix(prob=augmix_prob))
res.append(ToTensor())
if do_rea:
res.append(T.RandomErasing(p=rea_prob, value=rea_value))
if do_rpt:
res.append(RandomPatch(prob_happen=rpt_prob))
# if do_rpt:
# res.append(RandomPatch(prob_happen=rpt_prob))
else:
size_test = cfg.INPUT.SIZE_TEST
do_crop = cfg.INPUT.CROP.ENABLED