Definition at line 495 of file autoaugment.py.
◆ __init__()
| fastreid.data.transforms.autoaugment.AutoAugment.__init__ |
( |
| self, |
|
|
| total_iter ) |
Definition at line 497 of file autoaugment.py.
497 def __init__(self, total_iter):
498 self.total_iter = total_iter
499 self.gamma = 0
500 self.policy = auto_augment_policy()
501
◆ __call__()
| fastreid.data.transforms.autoaugment.AutoAugment.__call__ |
( |
| self, |
|
|
| img ) |
Definition at line 502 of file autoaugment.py.
502 def __call__(self, img):
503 if random.uniform(0, 1) > self.gamma:
504 sub_policy = random.choice(self.policy)
505 self.gamma = min(1.0, self.gamma + 1.0 / self.total_iter)
506 for op in sub_policy:
507 img = op(img)
508 return img
509 else:
510 return img
511
512
◆ gamma
| fastreid.data.transforms.autoaugment.AutoAugment.gamma |
◆ policy
| fastreid.data.transforms.autoaugment.AutoAugment.policy |
◆ total_iter
| fastreid.data.transforms.autoaugment.AutoAugment.total_iter |
The documentation for this class was generated from the following file: