-
-
Notifications
You must be signed in to change notification settings - Fork 56.5k
Unsupported situations for loading "Sum" layer using readNetFromTensorflow #19512
Copy link
Copy link
Closed
Closed
Copy link
Description
System information (version)
- OpenCV => 4.5.1
- Operating System / Platform => Windows 64 Bit
- Compiler => Visual Studio 2019
Detailed description
I am trying to use function "readNetFromTensorflow()" in dnn module to load a pb model. But I got the error.

The structure around is import/layer2/sum is

I read the source code and found when the parameter "reduction_indices" is -1 or 3, the "Sum" layer won't be added to "layer_id". So its next layer can't find the corresponding input layer. Is that mean opencv/dnn dose not support for loading such "Sum" layer ?
Can anyone help me ?
Steps to reproduce
The full Code is
#include <fstream>
#include <sstream>
#include <opencv2/dnn.hpp>
using namespace cv;
using namespace dnn;
int main(int argc, char** argv)
{
String modelPath = "3dssdOptimize1.pb";
Net net = readNetFromTensorflow(modelPath);
std::vector<cv::String> layerNames = net.getLayerNames();
return 0;
}
Issue submission checklist
- I report the issue, it's not a question
- I checked the problem with documentation, FAQ, open issues,
forum.opencv.org, Stack Overflow, etc and have not found solution - I updated to latest OpenCV version and the issue is still there
- There is reproducer code and related data files: videos, images, onnx, etc
Reactions are currently unavailable