diff --git a/mindspore/dataset/engine/validators.py b/mindspore/dataset/engine/validators.py index 9a95463beeeb9f5517ddea225168748dad45231e..4c8388ea639f40951f66a31a4614fe427f6ee2e2 100644 --- a/mindspore/dataset/engine/validators.py +++ b/mindspore/dataset/engine/validators.py @@ -1483,7 +1483,7 @@ def check_numpyslicesdataset(method): # Consider input is a tuple of dict elif isinstance(data[0], dict): - data_column = np.sum(len(list(data[i].keys())) for i in range(len(data))) + data_column = sum(len(list(data[i].keys())) for i in range(len(data))) if column_num != data_column: raise ValueError("Num of column is {0}, but required is {1}.".format(column_num, data_column)) diff --git a/mindspore/dataset/transforms/vision/py_transforms.py b/mindspore/dataset/transforms/vision/py_transforms.py index ee5a4b09fdae46a661e96efacd8736d66b009f68..b252c3434b988abbb9be50a28fb0947244ff95d5 100644 --- a/mindspore/dataset/transforms/vision/py_transforms.py +++ b/mindspore/dataset/transforms/vision/py_transforms.py @@ -606,7 +606,7 @@ class RandomRotation: class RandomOrder: """ - Perform a series of transforms to the input PIL image in a random oreder. + Perform a series of transforms to the input PIL image in a random order. Args: transforms (list): List of the transformations to be applied. @@ -1087,7 +1087,7 @@ class RandomAffine: The horizontal and vertical shift is selected randomly from the range: (-tx*width, tx*width) and (-ty*height, ty*height), respectively. If None, no translations gets applied. - scale (sequence, optional): Scaling factor interval (default=None, riginal scale is used). + scale (sequence, optional): Scaling factor interval (default=None, original scale is used). shear (int or float or sequence, optional): Range of shear factor (default=None). If a number 'shear', then a shear parallel to the x axis in the range of (-shear, +shear) is applied. If a tuple or list of size 2, then a shear parallel to the x axis in the range of (shear[0], shear[1])