(self, img)
| 394 | self.choice_weights = choice_weights |
| 395 | |
| 396 | def __call__(self, img): |
| 397 | # no replacement when using weighted choice |
| 398 | ops = np.random.choice( |
| 399 | self.ops, self.num_layers, replace=self.choice_weights is None, p=self.choice_weights) |
| 400 | for op in ops: |
| 401 | img = op(img) |
| 402 | return img |
| 403 | |
| 404 | |
| 405 | def rand_augment_transform(config_str, hparams, use_cmc=False): |
nothing calls this directly
no outgoing calls
no test coverage detected