@@ -584,22 +584,22 @@ def __repr__(self):
584584
585585
586586def auto_augment_transform (config_str : str , hparams : Optional [Dict ] = None ):
587- """
588- Create a AutoAugment transform
587+ """ Create a AutoAugment transform
589588
590589 Args:
591590 config_str: String defining configuration of auto augmentation. Consists of multiple sections separated by
592591 dashes ('-').
593592 The first section defines the AutoAugment policy (one of 'v0', 'v0r', 'original', 'originalr').
594-
595- The remaining sections:
596- 'mstd' - float std deviation of magnitude noise applied
597- Ex 'original-mstd0.5' results in AutoAugment with original policy, magnitude_std 0.5
598-
593+ While the remaining sections define other arguments
594+ * 'mstd' - float std deviation of magnitude noise applied
599595 hparams: Other hparams (kwargs) for the AutoAugmentation scheme
600596
601597 Returns:
602598 A PyTorch compatible Transform
599+
600+ Examples::
601+
602+ 'original-mstd0.5' results in AutoAugment with original policy, magnitude_std 0.5
603603 """
604604 config = config_str .split ('-' )
605605 policy_name = config [0 ]
@@ -764,27 +764,30 @@ def rand_augment_transform(
764764 hparams : Optional [Dict ] = None ,
765765 transforms : Optional [Union [str , Dict , List ]] = None ,
766766):
767- """
768- Create a RandAugment transform
767+ """ Create a RandAugment transform
769768
770769 Args:
771770 config_str (str): String defining configuration of random augmentation. Consists of multiple sections separated
772771 by dashes ('-'). The first section defines the specific variant of rand augment (currently only 'rand').
773- The remaining sections, not order sepecific determine
774- 'm' - integer magnitude of rand augment
775- 'n' - integer num layers (number of transform ops selected per image)
776- 'p' - float probability of applying each layer (default 0.5)
777- 'mstd' - float std deviation of magnitude noise applied, or uniform sampling if infinity (or > 100)
778- 'mmax' - set upper bound for magnitude to something other than default of _LEVEL_DENOM (10)
779- 'inc' - integer (bool), use augmentations that increase in severity with magnitude (default: 0)
780- 't' - str name of transform set to use
781- Ex 'rand-m9-n3-mstd0.5' results in RandAugment with magnitude 9, num_layers 3, magnitude_std 0.5
782- 'rand-mstd1-tweights' results in mag std 1.0, weighted transforms, default mag of 10 and num_layers 2
783-
772+ The remaining sections, not order specific determine
773+ * 'm' - integer magnitude of rand augment
774+ * 'n' - integer num layers (number of transform ops selected per image)
775+ * 'p' - float probability of applying each layer (default 0.5)
776+ * 'mstd' - float std deviation of magnitude noise applied, or uniform sampling if infinity (or > 100)
777+ * 'mmax' - set upper bound for magnitude to something other than default of _LEVEL_DENOM (10)
778+ * 'inc' - integer (bool), use augmentations that increase in severity with magnitude (default: 0)
779+ * 't' - str name of transform set to use
784780 hparams (dict): Other hparams (kwargs) for the RandAugmentation scheme
785781
786782 Returns:
787783 A PyTorch compatible Transform
784+
785+ Examples::
786+
787+ 'rand-m9-n3-mstd0.5' results in RandAugment with magnitude 9, num_layers 3, magnitude_std 0.5
788+
789+ 'rand-mstd1-tweights' results in mag std 1.0, weighted transforms, default mag of 10 and num_layers 2
790+
788791 """
789792 magnitude = _LEVEL_DENOM # default to _LEVEL_DENOM for magnitude (currently 10)
790793 num_layers = 2 # default to 2 ops per image
0 commit comments