未验证 提交 4528ed2a 编写于 作者: H HongyuJia 提交者: GitHub

polish default param of XXX_interp_test, the same default value with … (#45258)

* polish default param of XXX_interp_test, the same default value with XXX_interp_np

* set default value data_layout=NCHW, cause C++ end treat NCDHW the same way as NCHW
上级 9f1f1b0a
...@@ -29,14 +29,14 @@ def bicubic_interp_test(x, ...@@ -29,14 +29,14 @@ def bicubic_interp_test(x,
OutSize=None, OutSize=None,
SizeTensor=None, SizeTensor=None,
Scale=None, Scale=None,
data_layout='NCHW', data_layout='kNCHW',
out_d=-1, out_d=-1,
out_h=-1, out_h=-1,
out_w=-1, out_w=-1,
scale=[], scale=[],
interp_method='linear', interp_method='bicubic',
align_corners=False, align_corners=True,
align_mode=1): align_mode=0):
if isinstance(scale, float) or isinstance(scale, int): if isinstance(scale, float) or isinstance(scale, int):
scale_list = [] scale_list = []
for _ in range(len(x.shape) - 2): for _ in range(len(x.shape) - 2):
......
...@@ -32,9 +32,9 @@ def bilinear_interp_test(x, ...@@ -32,9 +32,9 @@ def bilinear_interp_test(x,
out_h=-1, out_h=-1,
out_w=-1, out_w=-1,
scale=[], scale=[],
interp_method='linear', interp_method='bilinear',
align_corners=False, align_corners=True,
align_mode=1): align_mode=0):
if isinstance(scale, float) or isinstance(scale, int): if isinstance(scale, float) or isinstance(scale, int):
scale_list = [] scale_list = []
for _ in range(len(x.shape) - 2): for _ in range(len(x.shape) - 2):
......
...@@ -34,8 +34,8 @@ def linear_interp_test(x, ...@@ -34,8 +34,8 @@ def linear_interp_test(x,
out_w=-1, out_w=-1,
scale=[], scale=[],
interp_method='linear', interp_method='linear',
align_corners=False, align_corners=True,
align_mode=1): align_mode=0):
if isinstance(scale, float) or isinstance(scale, int): if isinstance(scale, float) or isinstance(scale, int):
scale_list = [] scale_list = []
for _ in range(len(x.shape) - 2): for _ in range(len(x.shape) - 2):
......
...@@ -35,9 +35,9 @@ def nearest_interp_test(x, ...@@ -35,9 +35,9 @@ def nearest_interp_test(x,
out_h=-1, out_h=-1,
out_w=-1, out_w=-1,
scale=[], scale=[],
interp_method='linear', interp_method='nearest',
align_corners=False, align_corners=True,
align_mode=1): align_mode=0):
if isinstance(scale, float) or isinstance(scale, int): if isinstance(scale, float) or isinstance(scale, int):
scale_list = [] scale_list = []
for _ in range(len(x.shape) - 2): for _ in range(len(x.shape) - 2):
......
...@@ -35,9 +35,9 @@ def trilinear_interp_test(x, ...@@ -35,9 +35,9 @@ def trilinear_interp_test(x,
out_h=-1, out_h=-1,
out_w=-1, out_w=-1,
scale=[], scale=[],
interp_method='linear', interp_method='trilinear',
align_corners=False, align_corners=True,
align_mode=1): align_mode=0):
if isinstance(scale, float) or isinstance(scale, int): if isinstance(scale, float) or isinstance(scale, int):
scale_list = [] scale_list = []
for _ in range(len(x.shape) - 2): for _ in range(len(x.shape) - 2):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册