Fix missing prob assignment in RandomAppliedTrans (#173)

pull/178/head
xcnick 2022-01-13 19:47:27 +08:00 committed by GitHub
parent 95df89ef32
commit 8e3fc95e97
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -28,6 +28,7 @@ class RandomAppliedTrans(object):
def __init__(self, transforms, p=0.5):
t = [build_from_cfg(t, PIPELINES) for t in transforms]
self.trans = _transforms.RandomApply(t, p=p)
self.prob = p
def __call__(self, img):
return self.trans(img)