projects
/
platform
/
upstream
/
opencv.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1b8fba8
)
batchsize dynamic is set to index 0.
author
Zihao Mu
<zihaomu@outlook.com>
Wed, 20 Jul 2022 11:02:16 +0000
(19:02 +0800)
committer
Zihao Mu
<zihaomu@outlook.com>
Wed, 20 Jul 2022 11:02:16 +0000
(19:02 +0800)
modules/dnn/src/onnx/onnx_importer.cpp
patch
|
blob
|
history
diff --git
a/modules/dnn/src/onnx/onnx_importer.cpp
b/modules/dnn/src/onnx/onnx_importer.cpp
index
7390d03
..
e90581e
100644
(file)
--- a/
modules/dnn/src/onnx/onnx_importer.cpp
+++ b/
modules/dnn/src/onnx/onnx_importer.cpp
@@
-1303,7
+1303,7
@@
void ONNXImporter::parseReduce(LayerParams& layerParams, const opencv_onnx::Node
layerParams.set("dim", DictValue::arrayInt(&targetShape[0], targetShape.size()));
// Set batchsize dim as dynamic to be compatible with batch size >= 2.
- if (targetShape
[0] == 1 && targetShape
.size() > 1)
+ if (targetShape.size() > 1)
{
std::vector<int> dynamicAxes = {0}; // The index of batchsize dim is 0.
std::vector<int> inputIndices = {0};