Skip to content

Add BatchMatMul layer support for tf_importer #21154

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Dec 10, 2021
Merged

Add BatchMatMul layer support for tf_importer #21154

merged 4 commits into from
Dec 10, 2021

Conversation

Crayon-new
Copy link
Contributor

@Crayon-new Crayon-new commented Nov 30, 2021

Merge with extra: opencv/opencv_extra#940

Batch_matmul means we do matirx multiplication in a batch size.
We noiced that we can implement batch_matmul layer by "InnerProduct" when there is no const blob in the input tensors.

Pull Request Readiness Checklist

  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on a code under GPL or other license that is incompatible with OpenCV
  • The PR is proposed to proper branch
  • There is reference to original bug report and related work
  • There is accuracy test, performance test and test data in opencv_extra repository, if applicable
    Patch to opencv_extra has the same branch name.
  • The feature is well documented and sample code can be built with the project CMake

cqn2219076254 and others added 3 commits November 23, 2021 23:19
Signed-off-by: Crayon-new <1349159541@qq.com>
Signed-off-by: Crayon-new <1349159541@qq.com>
@alalek
Copy link
Member

alalek commented Nov 30, 2021

Both opencv/opencv_extra PRs must be opened from the same GitHub user.

pccvlab:MatMul_with_two_inputs
Crayon-new:MatMul_with_two_inputs

@Crayon-new
Copy link
Contributor Author

Both opencv/opencv_extra PRs must be opened from the same GitHub user.

pccvlab:MatMul_with_two_inputs
Crayon-new:MatMul_with_two_inputs

Fix it

@cqn2219076254
Copy link
Contributor

@alalek Hello, anything else do we need to do?

Copy link
Member

@rogday rogday left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution!

@rogday rogday self-requested a review December 9, 2021 14:38
Copy link
Member

@rogday rogday left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@alalek alalek merged commit 17bc856 into opencv:4.x Dec 10, 2021
@cqn2219076254 cqn2219076254 deleted the MatMul_with_two_inputs branch December 13, 2021 10:10
@alalek alalek mentioned this pull request Dec 30, 2021
@alalek alalek mentioned this pull request Feb 22, 2022
a-sajjad72 pushed a commit to a-sajjad72/opencv that referenced this pull request Mar 30, 2023
Add BatchMatMul layer support for tf_importer

* two inputs

* support batch_matmul

* refactor: remove useless code

* refactor: decrease nesting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants