opencv/modules/dnn/include/opencv2
Abduragim Shtanchaev d0820dac38
Merge pull request #26391 from Abdurrahheem:ash/lstm-new-graph-engine-latest
LSTM layer for new graph engine. #26391

Merge with extra: https://github.com/opencv/opencv_extra/pull/1218

This PR updates/creates LSTM layer compatible with new graph engine. It is based on previous LSTM implementation with some modification on how initializers blobs are processed.

Note: Following tests are currently are disabled 


Two following two tests are disbled since ONNNRuntime does not support `layout=1` attiribute inference. See a detailed issue #26456 on this.
- `LSTM_layout_seq` 
- `LSTM_layout_batch`

Following test fails with the new engine as it is not able to deal with shapes of the form [?, C, H, W]
- `LSTM_Activations`

Works:
- [x] One directional case any batch type 
 - [x] Fix directional case when batch size large than 1
 - [x] Add peepholes attribute

TODO with the next PRs:
 - [ ] Activation support

Note: 
  

> Currently `LSTM_layout_seq`, `LSTM_layout_batch` are disabled as the tests are incorrect. They do not comply with the ONNX standard. Particularly test outputs are of incorrect dimensionality. They produce 3-dimentinal output instead of 4-dimentional. 

------

### Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [x] The PR is proposed to the proper branch
- [x] There is a reference to the original bug report and related work
- [x] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [x] The feature is well documented and sample code can be built with the project CMake
2024-11-20 14:12:58 +03:00
..
dnn Merge pull request #26391 from Abdurrahheem:ash/lstm-new-graph-engine-latest 2024-11-20 14:12:58 +03:00
dnn.hpp Update documentation and samples 2018-08-17 14:21:29 +03:00