!16923 Update doc string of Dataset

From: @luoyang42
Reviewed-by: 
Signed-off-by:
This commit is contained in:
mindspore-ci-bot 2021-06-08 11:39:02 +08:00 committed by Gitee
commit 635c2b0adb
2 changed files with 845 additions and 497 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1378,7 +1378,7 @@ def random_color(img, degrees):
"""
if not is_pil(img):
raise TypeError("img should be PIL image. Got {}.".format(type(img)))
raise TypeError(augment_error_message.format(type(img)))
v = (degrees[1] - degrees[0]) * random.random() + degrees[0]
return ImageEnhance.Color(img).enhance(v)
@ -1398,7 +1398,7 @@ def random_sharpness(img, degrees):
"""
if not is_pil(img):
raise TypeError("img should be PIL image. Got {}.".format(type(img)))
raise TypeError(augment_error_message.format(type(img)))
v = (degrees[1] - degrees[0]) * random.random() + degrees[0]
return ImageEnhance.Sharpness(img).enhance(v)
@ -1419,7 +1419,7 @@ def auto_contrast(img, cutoff, ignore):
"""
if not is_pil(img):
raise TypeError("img should be PIL image. Got {}.".format(type(img)))
raise TypeError(augment_error_message.format(type(img)))
return ImageOps.autocontrast(img, cutoff, ignore)
@ -1437,7 +1437,7 @@ def invert_color(img):
"""
if not is_pil(img):
raise TypeError("img should be PIL image. Got {}.".format(type(img)))
raise TypeError(augment_error_message.format(type(img)))
return ImageOps.invert(img)
@ -1455,7 +1455,7 @@ def equalize(img):
"""
if not is_pil(img):
raise TypeError("img should be PIL image. Got {}.".format(type(img)))
raise TypeError(augment_error_message.format(type(img)))
return ImageOps.equalize(img)