Merge pull request !606 from pengyanjun/fix_dataset_api_doc_change_linetags/v0.2.0-alpha
| @@ -2494,8 +2494,7 @@ class GeneratorDataset(SourceDataset): | |||||
| shuffle (bool, optional): Whether or not to perform shuffle on the dataset. Random accessible input is required. | shuffle (bool, optional): Whether or not to perform shuffle on the dataset. Random accessible input is required. | ||||
| (default=None, expected order behavior shown in the table). | (default=None, expected order behavior shown in the table). | ||||
| sampler (Sampler/Iterable, optional): Object used to choose samples from the dataset. Random accessible input is | sampler (Sampler/Iterable, optional): Object used to choose samples from the dataset. Random accessible input is | ||||
| required. | |||||
| (default=None, expected order behavior shown in the table). | |||||
| required (default=None, expected order behavior shown in the table). | |||||
| num_shards (int, optional): Number of shards that the dataset should be divided into (default=None). | num_shards (int, optional): Number of shards that the dataset should be divided into (default=None). | ||||
| This argument should be specified only when 'num_samples' is "None". Random accessible input is required. | This argument should be specified only when 'num_samples' is "None". Random accessible input is required. | ||||
| shard_id (int, optional): The shard ID within num_shards (default=None). This argument should be specified only | shard_id (int, optional): The shard ID within num_shards (default=None). This argument should be specified only | ||||
| @@ -89,8 +89,8 @@ class Normalize(cde.NormalizeOp): | |||||
| Normalize the input image with respect to mean and standard deviation. | Normalize the input image with respect to mean and standard deviation. | ||||
| Args: | Args: | ||||
| mean (list): List of mean values for each channel, w.r.t channel order. | |||||
| std (list): List of standard deviations for each channel, w.r.t. channel order. | |||||
| mean (sequence): List or tuple of mean values for each channel, w.r.t channel order. | |||||
| std (sequence): List or tuple of standard deviations for each channel, w.r.t. channel order. | |||||
| """ | """ | ||||
| @check_normalize_c | @check_normalize_c | ||||
| @@ -109,6 +109,7 @@ class RandomCrop(cde.RandomCropOp): | |||||
| If size is an int, a square crop of size (size, size) is returned. | If size is an int, a square crop of size (size, size) is returned. | ||||
| If size is a sequence of length 2, it should be (height, width). | If size is a sequence of length 2, it should be (height, width). | ||||
| padding (int or sequence, optional): The number of pixels to pad the image (default=None). | padding (int or sequence, optional): The number of pixels to pad the image (default=None). | ||||
| If padding is not None, pad image firstly with padding values. | |||||
| If a single number is provided, it pads all borders with this value. | If a single number is provided, it pads all borders with this value. | ||||
| If a tuple or list of 2 values are provided, it pads the (left and top) | If a tuple or list of 2 values are provided, it pads the (left and top) | ||||
| with the first value and (right and bottom) with the second value. | with the first value and (right and bottom) with the second value. | ||||
| @@ -225,8 +225,8 @@ class Normalize: | |||||
| The values of the array need to be in range [0.0, 1.0]. | The values of the array need to be in range [0.0, 1.0]. | ||||
| Args: | Args: | ||||
| mean (list): List of mean values for each channel, w.r.t channel order. | |||||
| std (list): List of standard deviations for each channel, w.r.t. channel order. | |||||
| mean (sequence): List or tuple of mean values for each channel, w.r.t channel order. | |||||
| std (sequence): List or tuple of standard deviations for each channel, w.r.t. channel order. | |||||
| Examples: | Examples: | ||||
| >>> py_transforms.ComposeOp([py_transforms.Decode(), | >>> py_transforms.ComposeOp([py_transforms.Decode(), | ||||
| @@ -262,6 +262,7 @@ class RandomCrop: | |||||
| If size is an int, a square crop of size (size, size) is returned. | If size is an int, a square crop of size (size, size) is returned. | ||||
| If size is a sequence of length 2, it should be (height, width). | If size is a sequence of length 2, it should be (height, width). | ||||
| padding (int or sequence, optional): The number of pixels to pad the image (default=None). | padding (int or sequence, optional): The number of pixels to pad the image (default=None). | ||||
| If padding is not None, pad image firstly with padding values. | |||||
| If a single number is provided, it pads all borders with this value. | If a single number is provided, it pads all borders with this value. | ||||
| If a tuple or list of 2 values are provided, it pads the (left and top) | If a tuple or list of 2 values are provided, it pads the (left and top) | ||||
| with the first value and (right and bottom) with the second value. | with the first value and (right and bottom) with the second value. | ||||