提交 624ab97d 编写于 作者: M ms_yan

repair parameter check problem in random_resize_crop and random_crop

上级 da4c711d
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册