-
-
Notifications
You must be signed in to change notification settings - Fork 56.5k
dnn: inconsistant input data type for element-wise layers #24385
Copy link
Copy link
Closed
Description
System Information
latest opencv
Detailed description
In nary_eltwise_layers.cpp, there is a line dispatching by data type of output mat:
In the current dnn engine, we basically use either float or float16 for input (x) and output (y) mats; thats not a problem. The problem is for constsant input noes, their type can be something else, such as CV_32S in the following model:
In this case, the input x and output y has data type CV_32F, but the constant input B has data type CV_32S. However, the dispatcher calls the template with float because of data type of y, then B values are parsed in a wrong type, leading to incorrect results.
Steps to reproduce
Run the attached model with opencv dnn and check with reference input and output.
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 any solution
- I updated to the 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
