Skip to content
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

Additional fixes to 0/1D tests #25487

Open
wants to merge 14 commits into
base: 5.x
Choose a base branch
from

Conversation

Abdurrahheem
Copy link
Contributor

This has additional fixes requited for 0/1D tests.

Pull Request Readiness Checklist

See details at https://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


ASSERT_EQ(shape(output_ref), shape(outputs[0]));
ASSERT_EQ(1, outputs.size());
ASSERT_EQ(shape(outputs[0]), shape(output_ref));
Copy link
Member

Choose a reason for hiding this comment

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

Reference should be put in the first parameter and real output goes to the second.

See #25231 (comment).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Copy link
Member

Choose a reason for hiding this comment

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

No, I mean it should be

ASSERT_EQ(1, outputs.size());
ASSERT_EQ(shape(output_ref), shape(outputs[0]));

std::string opr = get<1>(GetParam());

LayerParams lp;
lp.type = "Scatter";
lp.name = "addLayer";
lp.set("axis", 0);
lp.set("axis", axis);
Copy link
Member

Choose a reason for hiding this comment

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

axis = input_shape.size() - 1 should also work.

@opencv-alalek
Copy link
Contributor

Abdurrahheem added this to the 5.x milestone

Why do you create a new milestone?

@Abdurrahheem Abdurrahheem modified the milestones: 5.x, 5.0 May 6, 2024
@Abdurrahheem
Copy link
Contributor Author

Abdurrahheem added this to the 5.x milestone

Why do you create a new milestone?

accidentally, sorry

@Abdurrahheem Abdurrahheem modified the milestones: 5.0, 5.x May 6, 2024
@asmorkalov asmorkalov modified the milestones: 5.0, 5.x May 7, 2024
@Abdurrahheem Abdurrahheem marked this pull request as ready for review May 8, 2024 17:50
std::vector<int>({1, 4}),
std::vector<int>({4, 4})
),
/*operation*/ testing::Values(0, 1)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
/*operation*/ testing::Values(0, 1)
/*axis*/ testing::Values(0, 1)

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.

None yet

5 participants