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

one_hot 算子参数问题 #50812

Closed
Patrick-Star125 opened this issue Feb 23, 2023 · 3 comments
Closed

one_hot 算子参数问题 #50812

Patrick-Star125 opened this issue Feb 23, 2023 · 3 comments
Assignees
Labels
PFCC Paddle Framework Contributor Club,https://github.com/PaddlePaddle/community/tree/master/pfcc status/close 已关闭 type/question 用户提问

Comments

@Patrick-Star125
Copy link
Contributor

Patrick-Star125 commented Feb 23, 2023

关于one_hot算子的num_class参数定义问题

image
image

文档中表示它只能是一个标量,实际使用也确实只能是int标量,但是在代码中它还是有tensor形式

image

请问它作为tensor时表示什么含义呢,什么场景下num_class可以作为tensor输入?

@paddle-bot
Copy link

paddle-bot bot commented Feb 23, 2023

您好,我们已经收到了您的问题,会安排技术人员尽快解答您的问题,请耐心等待。请您再次检查是否提供了清晰的问题描述、复现代码、环境&版本、报错信息等。同时,您也可以通过查看官网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!

@paddle-bot paddle-bot bot added the PFCC Paddle Framework Contributor Club,https://github.com/PaddlePaddle/community/tree/master/pfcc label Feb 23, 2023
@Shixiaowei02
Copy link
Contributor

您好,看了下源代码,我的理解是,depth 在传入 Tensor 的时候,不再是一个超参数,将是网络的中间变量,在 one_hot_v2_op.cc 中以 depth_tensor 传入。

@Patrick-Star125
Copy link
Contributor Author

谢谢,我理解了,只有输入depth_tensor 的形状为0-D时成立

@paddle-bot paddle-bot bot added status/close 已关闭 and removed status/new-issue 新建 labels Feb 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PFCC Paddle Framework Contributor Club,https://github.com/PaddlePaddle/community/tree/master/pfcc status/close 已关闭 type/question 用户提问
Projects
None yet
Development

No branches or pull requests

2 participants