Skip to content

Commit a6845e4

Browse files
committed
update test case
1 parent 0cb9b63 commit a6845e4

File tree

5 files changed

+7
-4
lines changed

5 files changed

+7
-4
lines changed
512 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

testdata/dnn/onnx/generate_onnx_models.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1362,11 +1362,14 @@ class Resize(nn.Module):
13621362
def __init__(self):
13631363
super(Resize, self).__init__()
13641364

1365-
def forward(self, x):
1366-
return F.interpolate(x, size=(6,8), mode="bilinear", align_corners=False)
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
13671369

1368-
x = torch.randn(1, 2, 3, 4)
1369-
save_data_and_model("resize_opset11", x, Resize(), version=11)
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)
13701373

13711374
#paddle2onnx model
13721375
class Resize_paddle(paddle.nn.Layer):
440 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)