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

[NPU] cast indices and label if their type is not consistent in accuracy npu op #33016

Merged
merged 3 commits into from
May 21, 2021

Conversation

pangyoki
Copy link
Contributor

@pangyoki pangyoki commented May 20, 2021

PR types

Bug fixes

PR changes

OPs

Describe

The inputs indices and label in accuracy op may be different types, resulting in an error when doing equal operations.
In this PR, compare the types of indices and label before the equal operation. If they are inconsistent, cast them to int32.

unittest result:
图片

GLOG:

图片

@paddle-bot-old
Copy link

Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@zhiqiu zhiqiu self-requested a review May 20, 2021 10:28
Copy link
Contributor

@zhiqiu zhiqiu left a comment

Choose a reason for hiding this comment

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

LGTM

@pangyoki pangyoki merged commit 70dc5f4 into PaddlePaddle:develop May 21, 2021
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.

3 participants