(weight_idx=0, transforms=None)
| 623 | |
| 624 | |
| 625 | def _select_rand_weights(weight_idx=0, transforms=None): |
| 626 | transforms = transforms or _RAND_TRANSFORMS |
| 627 | assert weight_idx == 0 # only one set of weights currently |
| 628 | rand_weights = _RAND_CHOICE_WEIGHTS_0 |
| 629 | probs = [rand_weights[k] for k in transforms] |
| 630 | probs /= np.sum(probs) |
| 631 | return probs |
| 632 | |
| 633 | |
| 634 | def rand_augment_ops(magnitude=10, hparams=None, transforms=None): |
no outgoing calls
no test coverage detected