提交 670a512a 编写于 作者: M mindspore-ci-bot 提交者: Gitee

!2145 Replace np.sum in check_numpyslicesdataset() to correct deprecated warning

Merge pull request !2145 from cathwong/ckw_dataset_npsum_slice_warn
......@@ -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))
......
......@@ -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])
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册