MCPcopy Index your code
hub / github.com/tensorpack/tensorpack / __init__

Method __init__

tensorpack/dataflow/imgaug/meta.py:46–58  ·  view source on GitHub ↗

Args: aug_lists (list): list of augmentors, or list of (augmentor, probability) tuples

(self, aug_lists)

Source from the content-addressed store, hash-verified

44class RandomChooseAug(ImageAugmentor):
45 """ Randomly choose one from a list of augmentors """
46 def __init__(self, aug_lists):
47 """
48 Args:
49 aug_lists (list): list of augmentors, or list of (augmentor, probability) tuples
50 """
51 if isinstance(aug_lists[0], (tuple, list)):
52 prob = [k[1] for k in aug_lists]
53 aug_lists = [k[0] for k in aug_lists]
54 self._init(locals())
55 else:
56 prob = [1.0 / len(aug_lists)] * len(aug_lists)
57 self._init(locals())
58 super(RandomChooseAug, self).__init__()
59
60 def reset_state(self):
61 super(RandomChooseAug, self).reset_state()

Callers

nothing calls this directly

Calls 2

_initMethod · 0.45
__init__Method · 0.45

Tested by

no test coverage detected