未验证 提交 6cfcbe05 编写于 作者: R ruri 提交者: GitHub

reduce interp op input size to pass CI, test=develop (#21341)

上级 45c1e7bb
...@@ -178,9 +178,9 @@ class TestBilinearInterpCase2(TestBilinearInterpOp): ...@@ -178,9 +178,9 @@ class TestBilinearInterpCase2(TestBilinearInterpOp):
class TestBilinearInterpCase3(TestBilinearInterpOp): class TestBilinearInterpCase3(TestBilinearInterpOp):
def init_test_case(self): def init_test_case(self):
self.interp_method = 'bilinear' self.interp_method = 'bilinear'
self.input_shape = [1, 1, 128, 64] self.input_shape = [1, 1, 32, 64]
self.out_h = 64 self.out_h = 64
self.out_w = 128 self.out_w = 32
self.scale = 0. self.scale = 0.
self.align_corners = True self.align_corners = True
self.align_mode = 1 self.align_mode = 1
...@@ -213,11 +213,11 @@ class TestBilinearInterpCase5(TestBilinearInterpOp): ...@@ -213,11 +213,11 @@ class TestBilinearInterpCase5(TestBilinearInterpOp):
class TestBilinearInterpCase6(TestBilinearInterpOp): class TestBilinearInterpCase6(TestBilinearInterpOp):
def init_test_case(self): def init_test_case(self):
self.interp_method = 'bilinear' self.interp_method = 'bilinear'
self.input_shape = [1, 1, 128, 64] self.input_shape = [1, 1, 32, 64]
self.out_h = 64 self.out_h = 64
self.out_w = 128 self.out_w = 32
self.scale = 0. self.scale = 0.
self.out_size = np.array([65, 129]).astype("int32") self.out_size = np.array([65, 33]).astype("int32")
self.align_corners = True self.align_corners = True
self.align_mode = 1 self.align_mode = 1
...@@ -225,8 +225,8 @@ class TestBilinearInterpCase6(TestBilinearInterpOp): ...@@ -225,8 +225,8 @@ class TestBilinearInterpCase6(TestBilinearInterpOp):
class TestBilinearInterpSame(TestBilinearInterpOp): class TestBilinearInterpSame(TestBilinearInterpOp):
def init_test_case(self): def init_test_case(self):
self.interp_method = 'bilinear' self.interp_method = 'bilinear'
self.input_shape = [2, 3, 128, 64] self.input_shape = [2, 3, 32, 64]
self.out_h = 128 self.out_h = 32
self.out_w = 64 self.out_w = 64
self.scale = 0. self.scale = 0.
self.align_corners = True self.align_corners = True
...@@ -307,9 +307,9 @@ class TestBilinearInterpOpUint8(OpTest): ...@@ -307,9 +307,9 @@ class TestBilinearInterpOpUint8(OpTest):
class TestBilinearInterpCase1Uint8(TestBilinearInterpOpUint8): class TestBilinearInterpCase1Uint8(TestBilinearInterpOpUint8):
def init_test_case(self): def init_test_case(self):
self.interp_method = 'bilinear' self.interp_method = 'bilinear'
self.input_shape = [2, 3, 128, 64] self.input_shape = [2, 3, 32, 64]
self.out_h = 120 self.out_h = 64
self.out_w = 50 self.out_w = 32
self.scale = 0. self.scale = 0.
self.align_corners = True self.align_corners = True
self.align_mode = 1 self.align_mode = 1
......
...@@ -152,9 +152,9 @@ class TestNearestNeighborInterpCase2(TestNearestInterpOp): ...@@ -152,9 +152,9 @@ class TestNearestNeighborInterpCase2(TestNearestInterpOp):
class TestNearestNeighborInterpCase3(TestNearestInterpOp): class TestNearestNeighborInterpCase3(TestNearestInterpOp):
def init_test_case(self): def init_test_case(self):
self.interp_method = 'nearest' self.interp_method = 'nearest'
self.input_shape = [1, 1, 128, 64] self.input_shape = [1, 1, 32, 64]
self.out_h = 64 self.out_h = 64
self.out_w = 128 self.out_w = 32
self.scale = 0. self.scale = 0.
self.align_corners = True self.align_corners = True
...@@ -184,9 +184,9 @@ class TestNearestNeighborInterpCase5(TestNearestInterpOp): ...@@ -184,9 +184,9 @@ class TestNearestNeighborInterpCase5(TestNearestInterpOp):
class TestNearestNeighborInterpCase6(TestNearestInterpOp): class TestNearestNeighborInterpCase6(TestNearestInterpOp):
def init_test_case(self): def init_test_case(self):
self.interp_method = 'nearest' self.interp_method = 'nearest'
self.input_shape = [1, 1, 128, 64] self.input_shape = [1, 1, 32, 64]
self.out_h = 64 self.out_h = 64
self.out_w = 128 self.out_w = 32
self.scale = 0. self.scale = 0.
self.out_size = np.array([65, 129]).astype("int32") self.out_size = np.array([65, 129]).astype("int32")
self.align_corners = True self.align_corners = True
...@@ -195,8 +195,8 @@ class TestNearestNeighborInterpCase6(TestNearestInterpOp): ...@@ -195,8 +195,8 @@ class TestNearestNeighborInterpCase6(TestNearestInterpOp):
class TestNearestNeighborInterpSame(TestNearestInterpOp): class TestNearestNeighborInterpSame(TestNearestInterpOp):
def init_test_case(self): def init_test_case(self):
self.interp_method = 'nearest' self.interp_method = 'nearest'
self.input_shape = [2, 3, 128, 64] self.input_shape = [2, 3, 32, 64]
self.out_h = 128 self.out_h = 32
self.out_w = 64 self.out_w = 64
self.scale = 0. self.scale = 0.
self.align_corners = True self.align_corners = True
...@@ -271,9 +271,9 @@ class TestNearestInterpOpUint8(OpTest): ...@@ -271,9 +271,9 @@ class TestNearestInterpOpUint8(OpTest):
class TestNearestNeighborInterpCase1Uint8(TestNearestInterpOpUint8): class TestNearestNeighborInterpCase1Uint8(TestNearestInterpOpUint8):
def init_test_case(self): def init_test_case(self):
self.interp_method = 'nearest' self.interp_method = 'nearest'
self.input_shape = [2, 3, 128, 64] self.input_shape = [2, 3, 32, 64]
self.out_h = 120 self.out_h = 80
self.out_w = 50 self.out_w = 40
self.scale = 0. self.scale = 0.
self.align_corners = True self.align_corners = True
......
...@@ -428,8 +428,8 @@ class TestTrilinearInterpScale2(TestTrilinearInterpOp): ...@@ -428,8 +428,8 @@ class TestTrilinearInterpScale2(TestTrilinearInterpOp):
def init_test_case(self): def init_test_case(self):
self.interp_method = 'trilinear' self.interp_method = 'trilinear'
self.input_shape = [2, 3, 5, 7, 9] self.input_shape = [2, 3, 5, 7, 9]
self.out_d = 82 self.out_d = 60
self.out_h = 60 self.out_h = 40
self.out_w = 25 self.out_w = 25
self.scale = 1. self.scale = 1.
self.align_corners = True self.align_corners = True
...@@ -440,8 +440,8 @@ class TestTrilinearInterpScale3(TestTrilinearInterpOp): ...@@ -440,8 +440,8 @@ class TestTrilinearInterpScale3(TestTrilinearInterpOp):
def init_test_case(self): def init_test_case(self):
self.interp_method = 'trilinear' self.interp_method = 'trilinear'
self.input_shape = [2, 3, 5, 7, 9] self.input_shape = [2, 3, 5, 7, 9]
self.out_d = 82 self.out_d = 60
self.out_h = 60 self.out_h = 40
self.out_w = 25 self.out_w = 25
self.scale = 1.5 self.scale = 1.5
self.align_corners = True self.align_corners = True
...@@ -452,8 +452,8 @@ class TestTrilinearInterpZero(TestTrilinearInterpOp): ...@@ -452,8 +452,8 @@ class TestTrilinearInterpZero(TestTrilinearInterpOp):
def init_test_case(self): def init_test_case(self):
self.interp_method = 'trilinear' self.interp_method = 'trilinear'
self.input_shape = [2, 3, 5, 7, 11] self.input_shape = [2, 3, 5, 7, 11]
self.out_d = 82 self.out_d = 60
self.out_h = 60 self.out_h = 40
self.out_w = 25 self.out_w = 25
self.scale = 0.2 self.scale = 0.2
self.align_corners = False self.align_corners = False
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册