mirror of
https://github.com/opencv/opencv.git
synced 2025-07-28 16:25:01 +08:00
batchsize dynamic is set to index 0.
This commit is contained in:
parent
1b8fba8e26
commit
98c33c605d
@ -1303,7 +1303,7 @@ void ONNXImporter::parseReduce(LayerParams& layerParams, const opencv_onnx::Node
|
|||||||
layerParams.set("dim", DictValue::arrayInt(&targetShape[0], targetShape.size()));
|
layerParams.set("dim", DictValue::arrayInt(&targetShape[0], targetShape.size()));
|
||||||
|
|
||||||
// Set batchsize dim as dynamic to be compatible with batch size >= 2.
|
// 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> dynamicAxes = {0}; // The index of batchsize dim is 0.
|
||||||
std::vector<int> inputIndices = {0};
|
std::vector<int> inputIndices = {0};
|
||||||
|
Loading…
Reference in New Issue
Block a user