diff --git a/ppcls/configs/ssl/CCSSL/FixMatchCCSSL_cifar100_10000_4gpu.yaml b/ppcls/configs/ssl/CCSSL/FixMatchCCSSL_cifar100_10000_4gpu.yaml index e8055d5bbec8139de68e9162dcea67dfd1a15a01..72e39816e2b2402b0047dab76562124e3c48accd 100644 --- a/ppcls/configs/ssl/CCSSL/FixMatchCCSSL_cifar100_10000_4gpu.yaml +++ b/ppcls/configs/ssl/CCSSL/FixMatchCCSSL_cifar100_10000_4gpu.yaml @@ -162,7 +162,7 @@ DataLoader: contrast: 0.4 saturation: 0.4 hue: 0.1 - p: 0.8 + p: 1.0 - RandomGrayscale: p: 0.2 - NormalizeImage: diff --git a/ppcls/configs/ssl/CCSSL/FixMatchCCSSL_cifar10_4000_4gpu.yaml b/ppcls/configs/ssl/CCSSL/FixMatchCCSSL_cifar10_4000_4gpu.yaml index 22ec818edc063e08345d3d1147b899ee68bc77cc..d7f640bbc03e483523177b52abc9215b66bae305 100644 --- a/ppcls/configs/ssl/CCSSL/FixMatchCCSSL_cifar10_4000_4gpu.yaml +++ b/ppcls/configs/ssl/CCSSL/FixMatchCCSSL_cifar10_4000_4gpu.yaml @@ -162,7 +162,7 @@ DataLoader: contrast: 0.4 saturation: 0.4 hue: 0.1 - p: 0.8 + p: 1.0 - RandomGrayscale: p: 0.2 - NormalizeImage: diff --git a/ppcls/data/preprocess/ops/randaugment.py b/ppcls/data/preprocess/ops/randaugment.py index 538e2b470cf6fad0182c8386deee18df7a5e3f30..f3a61bd506243125636db06f648ebdd69e6043f5 100644 --- a/ppcls/data/preprocess/ops/randaugment.py +++ b/ppcls/data/preprocess/ops/randaugment.py @@ -168,6 +168,8 @@ class RandomApply(object): self.trans = T.Compose(ts) def __call__(self, img): + if self.p < np.random.rand(1): + return img timg = self.trans(img) return timg