fix Split partial sum

pull/20556/head
Smirnov Egor 3 years ago
parent cfb36443fb
commit 9ef41f68fb
  1. 2
      modules/dnn/src/onnx/onnx_importer.cpp
  2. 1
      modules/dnn/test/test_onnx_importer.cpp

@ -851,7 +851,7 @@ void ONNXImporter::parseSplit(LayerParams& layerParams, const opencv_onnx::NodeP
std::vector<int> slicePoints(numSplits - 1, splits.get<int>(0));
for (int i = 1; i < splits.size() - 1; ++i)
{
slicePoints[i] = slicePoints[i - 1] + splits.get<int>(i - 1);
slicePoints[i] = slicePoints[i - 1] + splits.get<int>(i);
}
layerParams.set("slice_point", DictValue::arrayInt(&slicePoints[0], slicePoints.size()));
}

@ -617,6 +617,7 @@ TEST_P(Test_ONNX_layers, Split)
testONNXModels("split_2");
testONNXModels("split_3");
testONNXModels("split_4");
testONNXModels("split_sizes");
}
TEST_P(Test_ONNX_layers, Slice)

Loading…
Cancel
Save