!63 dataset: repair parameter check problem in random_resize_crop and random_crop

Merge pull request !63 from ms_yan/repair_pytrans_check
This commit is contained in:
mindspore-ci-bot 2020-03-31 21:26:14 +08:00 committed by Gitee
commit 58cd173051
1 changed files with 2 additions and 1 deletions

View File

@ -41,7 +41,7 @@ def check_crop_size(size):
else:
raise TypeError("Size should be a single integer or a list/tuple (h, w) of length 2.")
for value in size:
check_value(value, (1, INT32_MAX))
check_pos_int32(value)
return size
@ -239,6 +239,7 @@ def check_random_resize_crop(method):
kwargs["scale"] = scale
if ratio is not None:
check_range(ratio, [0, FLOAT_MAX_INTEGER])
check_positive(ratio[0])
kwargs["ratio"] = ratio
if interpolation is not None:
check_inter_mode(interpolation)