Skip to content

Commit 34c0d25

Browse files
author
Abduragim Shtanchaev
committed
added split = 1 test for split layer
1 parent 847035e commit 34c0d25

File tree

4 files changed

+7
-0
lines changed

4 files changed

+7
-0
lines changed
176 Bytes
Binary file not shown.
176 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
@@ -868,6 +868,11 @@ def forward(self, x):
868868
tup = torch.split(x, self.split_size_sections, self.dim)
869869
return torch.cat(tup)
870870

871+
872+
model = Split(dim=0, split_size_sections=1)
873+
input = Variable(torch.ones((1, 3, 2, 2), dtype=torch.float32))
874+
save_data_and_model("split_0", input, model)
875+
871876
model = Split()
872877
input = Variable(torch.tensor([1., 2.], dtype=torch.float32))
873878
save_data_and_model("split_1", input, model)
@@ -888,6 +893,8 @@ def forward(self, x):
888893
model = Split(dim=-1, split_size_sections=[1, 2])
889894
save_data_and_model("split_6", input2, model, version=13)
890895

896+
897+
891898
class SplitSizes(nn.Module):
892899
def __init__(self, *args, **kwargs):
893900
super(SplitSizes, self).__init__()
297 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)