Skip to content

Commit 7652263

Browse files
authored
Merge pull request #1053 from zihaomu:onnx_opset13_split
DNN: add new test case for split of opset 13
2 parents ba08f71 + b1d009f commit 7652263

File tree

7 files changed

+7
-0
lines changed

7 files changed

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

testdata/dnn/onnx/generate_onnx_models.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -845,6 +845,13 @@ def forward(self, x):
845845
model = Split(dim=0, split_size_sections=[1, 1])
846846
save_data_and_model("split_4", input, model)
847847

848+
input2 = Variable(torch.tensor([1., 2., 3.], dtype=torch.float32))
849+
model = Split(dim=0, split_size_sections=[1, 2])
850+
save_data_and_model("split_5", input2, model, version=13)
851+
852+
model = Split(dim=-1, split_size_sections=[1, 2])
853+
save_data_and_model("split_6", input2, model, version=13)
854+
848855
class SplitSizes(nn.Module):
849856
def __init__(self, *args, **kwargs):
850857
super(SplitSizes, self).__init__()
305 Bytes
Binary file not shown.
314 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)