Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Support forUnflatten operation requred byAttention layer#25851

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

@Abdurrahheem
Copy link
Contributor

Pull Request Readiness Checklist

All test data and models for PR are located#1188

This PR fixes issue reised when importing batched vanillaAttention layer fromPyTorch via ONNX. Currently batched version ofAttention layer in PyTorchhas unflatten operation inside.unflatten operation causes issue inreshape layer (see the Reshape_2 in the graph below) due to incorrect output ofslice layer. This PR particularly fixesslice andconcat layers to handleunflatten operation.

image

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

  • 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 another license that is incompatible with OpenCV
  • The PR is proposed to the proper branch
  • There is a reference to the 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

if (range.start <0)
{
range.start += n;
if (!(range.start == n)){
Copy link
Member

Choose a reason for hiding this comment

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

if (range.start != n)

Copy link
Member

Choose a reason for hiding this comment

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

Ifrange.start == n doe it mean uninitialized value?

Copy link
ContributorAuthor

@AbdurrahheemAbdurrahheemJul 3, 2024
edited
Loading

Choose a reason for hiding this comment

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

no, it means thatstart index is equal to the last dimention of the input, in which case we do not want it to be(n-1)

@asmorkalov
Copy link
Contributor

@Abdurrahheem Should it be back-ported to 4.x too?

@asmorkalov
Copy link
Contributor

Replaced by#25861

@asmorkalovasmorkalov mentioned this pull requestJul 17, 2024
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@dkurtdkurtdkurt left review comments

@asmorkalovasmorkalovAwaiting requested review from asmorkalov

@alexlyulkovalexlyulkovAwaiting requested review from alexlyulkov

Assignees

@AbdurrahheemAbdurrahheem

Labels

None yet

Projects

Status: Done

Milestone

5.0-alpha

Development

Successfully merging this pull request may close these issues.

3 participants

@Abdurrahheem@asmorkalov@dkurt

[8]ページ先頭

©2009-2025 Movatter.jp