mirror of
https://github.com/opencv/opencv.git
synced 2024-11-27 20:50:25 +08:00
Merge pull request #20556 from rogday:onnx_split_sum_fix
This commit is contained in:
commit
a9817e9127
@ -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…
Reference in New Issue
Block a user