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

Added PyTorch link and unit tests for argmax #900

Closed
wants to merge 1 commit into from

Conversation

HangenYuu
Copy link
Contributor

Description

Implemented the PyTorch link and unit tests for the Argmax Op.

Related Issue

Checklist

Type of change

  • New feature / enhancement
  • Bug fix
  • Documentation
  • Maintenance
  • Other (please specify):

)
@pytest.mark.parametrize(
"axis",
[None, 1, (0,)],
Copy link
Member

Choose a reason for hiding this comment

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

Can you make the test tensor a tensor3 (3 dims), and test also axis=(0, 2)? This is something PyTensor supports but not e.g., numpy and perhaps pytorch as well. In that case you'll need to copy the logic used in perform instead of just calling argmax. If it works, great!

Copy link
Member

@ricardoV94 ricardoV94 Jul 8, 2024

Choose a reason for hiding this comment

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

In general with axis Ops we should always test axis=None, axis=(i,) and axis=(i, j), for 3d inputs, so we test all, a single axis or partial axes

@HangenYuu
Copy link
Contributor Author

I will merge the content of this PR into #878.

@HangenYuu HangenYuu closed this Jul 10, 2024
@ricardoV94
Copy link
Member

I will merge the content of this PR into #878.

As I wrote in the other PR this is not something we usually prefer. What was the reason that led you to do it?

@HangenYuu HangenYuu deleted the torch_argmax branch July 15, 2024 02:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants