MCPcopy Create free account
hub / github.com/HobbitLong/PyContrast / __call__

Method __call__

pycontrast/datasets/RandAugment.py:396–402  ·  view source on GitHub ↗
(self, img)

Source from the content-addressed store, hash-verified

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
405def rand_augment_transform(config_str, hparams, use_cmc=False):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected