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

A bug in module for GPU #40217

Closed
rose-jinyang opened this issue Mar 7, 2022 · 4 comments
Closed

A bug in module for GPU #40217

rose-jinyang opened this issue Mar 7, 2022 · 4 comments
Assignees

Comments

@rose-jinyang
Copy link

Hello
How are you?
Thanks for contributing to this project.
I found a bug in module for GPU.

The script that I ran is the following:

import paddle
import paddle.nn.functional as F

a = paddle.randint(0, 10, (4, 4))
b = F.one_hot(a, 5)
print(a)
print(b)

The above script does NOT yield any issue when running on GPU.
But when running on CPU it yields an issue.
image

@paddle-bot-old
Copy link

paddle-bot-old bot commented Mar 7, 2022

您好,我们已经收到了您的问题,会安排技术人员尽快解答您的问题,请耐心等待。请您再次检查是否提供了清晰的问题描述、复现代码、环境&版本、报错信息等。同时,您也可以通过查看官网API文档常见问题历史IssueAI社区来寻求解答。祝您生活愉快~

Hi! We've received your issue and please be patient to get responded. We will arrange technicians to answer your questions as soon as possible. Please make sure that you have posted enough message to demo your request. You may also check out the APIFAQGithub Issue and AI community to get the answer.Have a nice day!

@zhiboniu
Copy link
Contributor

zhiboniu commented Mar 7, 2022

The input Tensor's element(0<x<10 here) should not bigger than class_num in API one_hot(which is 5 here)。
For more details please refer to:
https://www.paddlepaddle.org.cn/documentation/docs/en/api/paddle/nn/functional/one_hot_en.html

@rose-jinyang
Copy link
Author

That's right.
However, the problem is that the above script does NOT yield any issue on GPU.

@zhiboniu
Copy link
Contributor

zhiboniu commented Mar 7, 2022

O, that is not right action on GPU, thanks for your information, we will fix this bug soonly.

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

No branches or pull requests

3 participants