We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 1e890c8 + be05aa0 commit 2b76999Copy full SHA for 2b76999
testdata/dnn/onnx/data/input_split_0.npy
176 Bytes
testdata/dnn/onnx/data/output_split_0.npy
testdata/dnn/onnx/generate_onnx_models.py
@@ -868,6 +868,15 @@ def forward(self, x):
868
tup = torch.split(x, self.split_size_sections, self.dim)
869
return torch.cat(tup)
870
871
+class SimpleSplit(nn.Module):
872
+ def forward(self, image):
873
+ return torch.cat([img for img in image])
874
+
875
876
+model = SimpleSplit()
877
+input = torch.ones((1, 3, 2, 2))
878
+save_data_and_model("split_0", input, model, version=11)
879
880
model = Split()
881
input = Variable(torch.tensor([1., 2.], dtype=torch.float32))
882
save_data_and_model("split_1", input, model)
@@ -888,6 +897,8 @@ def forward(self, x):
888
897
model = Split(dim=-1, split_size_sections=[1, 2])
889
898
save_data_and_model("split_6", input2, model, version=13)
890
899
900
901
891
902
class SplitSizes(nn.Module):
892
903
def __init__(self, *args, **kwargs):
893
904
super(SplitSizes, self).__init__()
testdata/dnn/onnx/models/split_0.onnx
286 Bytes
0 commit comments