Definition at line 616 of file autoaugment.py.
◆ __init__()
| fastreid.data.transforms.autoaugment.RandAugment.__init__ |
( |
| self, |
|
|
| ops, |
|
|
| num_layers = 2, |
|
|
| choice_weights = None ) |
Definition at line 617 of file autoaugment.py.
617 def __init__(self, ops, num_layers=2, choice_weights=None):
618 self.ops = ops
619 self.num_layers = num_layers
620 self.choice_weights = choice_weights
621
◆ __call__()
| fastreid.data.transforms.autoaugment.RandAugment.__call__ |
( |
| self, |
|
|
| img ) |
Definition at line 622 of file autoaugment.py.
622 def __call__(self, img):
623
624 ops = np.random.choice(
625 self.ops, self.num_layers, replace=self.choice_weights is None, p=self.choice_weights)
626 for op in ops:
627 img = op(img)
628 return img
629
630
◆ choice_weights
| fastreid.data.transforms.autoaugment.RandAugment.choice_weights |
◆ num_layers
| fastreid.data.transforms.autoaugment.RandAugment.num_layers |
◆ ops
| fastreid.data.transforms.autoaugment.RandAugment.ops |
The documentation for this class was generated from the following file: