|
|
@ -7144,14 +7144,16 @@ def image_resize(input,
|
|
|
|
it is recommended to use actual_shape instead of \
|
|
|
|
it is recommended to use actual_shape instead of \
|
|
|
|
out_shape to specify output shape dynamically.")
|
|
|
|
out_shape to specify output shape dynamically.")
|
|
|
|
inputs['OutSize'] = out_shape
|
|
|
|
inputs['OutSize'] = out_shape
|
|
|
|
elif not (_is_list_or_turple_(out_shape)):
|
|
|
|
else:
|
|
|
|
raise TypeError("out_shape should be a list or tuple or Variable.")
|
|
|
|
if not (_is_list_or_turple_(out_shape)):
|
|
|
|
elif len(out_shape) != 2:
|
|
|
|
raise TypeError("out_shape should be a list or tuple or Variable.")
|
|
|
|
raise ValueError("out_shape length should be 2.")
|
|
|
|
if len(out_shape) != 2:
|
|
|
|
|
|
|
|
raise ValueError("out_shape length should be 2.")
|
|
|
|
out_shape = list(map(int, out_shape))
|
|
|
|
|
|
|
|
attrs['out_h'] = out_shape[0]
|
|
|
|
out_shape = list(map(int, out_shape))
|
|
|
|
attrs['out_w'] = out_shape[1]
|
|
|
|
attrs['out_h'] = out_shape[0]
|
|
|
|
|
|
|
|
attrs['out_w'] = out_shape[1]
|
|
|
|
|
|
|
|
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
if scale <= 0:
|
|
|
|
if scale <= 0:
|
|
|
|
raise ValueError("scale should be greater than zero.")
|
|
|
|
raise ValueError("scale should be greater than zero.")
|
|
|
|