Comments (4)
@LaurentBerger I made a patch to fix this problem. The last subgraph in the model (after the last Conv
) matches the LayerNorm subgraph pattern but it should not due to axes[-1] is not either -1 nor the axis of the last dimension. This was not considered in the previous matching implementation.
from opencv.
Problem is in AttentionLayer.
this
/* Fusion for LayerNormalization.
Graph before fusion
+-> ReduceMean ->+
| |
[Input] -------> Sub -----------------------------------------------> Div -> Mul(B=weight) -> Add(B=bias) -> [Output]
| |
+-> Pow(Y=2) -> ReduceMean -> Add(B=epsilon) -> Sqrt ->+
Graph after fusion
[Input] -> LayerNorm -> [Output]
\
[weight], [bias]
*/
cannot replace this case (extract from sam encoder)
test_attentionlayer (2).zip
from opencv.
@fengyuentau could you take a look?
from opencv.
How to solve? add a flag to disable onnx_graph_simplifier
from opencv.
Related Issues (20)
- mouse events didn't work with me on notebook python version HOT 1
- Apple Privacy Info file HOT 1
- error building 4.9.0 with MSVS HOT 2
- OCL_FP16 target tests failed in CI linux64-avx2 HOT 5
- The picture of the previous operation will be displayed in the background on iOS 17 HOT 2
- 5.x: Recreate deleted C-API tests in C++
- PLY models with unknown vertex properties are loaded incorrectly
- Logical defect in FilterSpecklesImpl
- findCirclesGrid can't detect rotated SYMMETRIC_GRID HOT 2
- TFLite importer: add support to SPLIT operation HOT 5
- HDR CalibrateDebevec: triangleWeights() should be 0 at limits
- infinite loop in findEssentialMat with 4.9.0 conda HOT 3
- invalid JS export generated
- findCirclesGrid can't detect some asymmetric grids HOT 7
- TFLite importer: add support for "HardSwishInt8" activation layer
- The definition of RotatedRect in python type hint is wrong. HOT 2
- All different shapes of circles depending on the method HOT 4
- Parsing ONNX with AND layer fails.
- DNN module fails to compile against cuDNN 9.0 HOT 20
- Opencv.js --threads how to compleatly release memory when refreshing page?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from opencv.