MCPcopy Create free account
hub / github.com/TorchSSL/TorchSSL / Cutout

Function Cutout

datasets/augmentation/randaugment.py:114–120  ·  view source on GitHub ↗
(img, v)

Source from the content-addressed store, hash-verified

112
113
114def Cutout(img, v): #[0, 60] => percentage: [0, 0.2] => change to [0, 0.5]
115 assert 0.0 <= v <= 0.5
116 if v <= 0.:
117 return img
118
119 v = v * img.size[0]
120 return CutoutAbs(img, v)
121
122
123def CutoutAbs(img, v): # [0, 60] => percentage: [0, 0.2]

Callers 1

__call__Method · 0.85

Calls 1

CutoutAbsFunction · 0.85

Tested by

no test coverage detected