Skip to content

Commit 6b36dca

Browse files
committed
update testcase
1 parent a6845e4 commit 6b36dca

File tree

5 files changed

+3
-16
lines changed

5 files changed

+3
-16
lines changed
-224 Bytes
Binary file not shown.
-512 Bytes
Binary file not shown.
-512 Bytes
Binary file not shown.

testdata/dnn/onnx/generate_onnx_models.py

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1358,23 +1358,10 @@ def forward(self, x):
13581358
model = NormalizeFusion()
13591359
save_data_and_model("normalize_fusion", x, model)
13601360

1361-
class Resize(nn.Module):
1362-
def __init__(self):
1363-
super(Resize, self).__init__()
1364-
1365-
def forward(self, x, y):
1366-
size = y.shape[-2:]
1367-
x = F.interpolate(x, size=size, mode="bilinear", align_corners=False)
1368-
return x
1369-
1370-
input_0 = torch.randn(1, 2, 3, 4)
1371-
input_1 = torch.randn(1, 2, 6, 8)
1372-
save_data_and_model_multy_inputs("resize_opset11", Resize(), input_0, input_1, version=11)
1373-
13741361
#paddle2onnx model
1375-
class Resize_paddle(paddle.nn.Layer):
1362+
class Resize_HumanSeg(paddle.nn.Layer):
13761363
def __init__(self, ):
1377-
super(Resize_paddle, self).__init__()
1364+
super(Resize_HumanSeg, self).__init__()
13781365

13791366
def forward(self, x0):
13801367
x1 = paddle.nn.functional.interpolate(x0,size=[6,8],mode='bilinear',align_corners=False)
@@ -1392,4 +1379,4 @@ def save_data_and_paddle_model(model, name, input_data):
13921379

13931380
input_shape = [1, 2, 3, 4]
13941381
x = paddle.rand(input_shape, dtype="float32")
1395-
save_data_and_paddle_model(Resize_paddle(), "resize_humanseg", x)
1382+
save_data_and_paddle_model(Resize_HumanSeg(), "resize_humanseg", x)
-1.06 KB
Binary file not shown.

0 commit comments

Comments
 (0)