MCPcopy Create free account
hub / github.com/QWTforGithub/T2LDM / _select_rand_weights

Function _select_rand_weights

timm/data/auto_augment.py:625–631  ·  view source on GitHub ↗
(weight_idx=0, transforms=None)

Source from the content-addressed store, hash-verified

623
624
625def _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
634def rand_augment_ops(magnitude=10, hparams=None, transforms=None):

Callers 1

rand_augment_transformFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected