Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

paddle.flatten_这个api无法使用,paddle提示没有这个api,但是官网给出了这个api,在位置的flatten_而不是flatten。 #63054

Closed
sealoongleft opened this issue Mar 26, 2024 · 8 comments
Assignees
Labels

Comments

@sealoongleft
Copy link

文档链接&描述 Document Links & Description

有问题的文档链接:https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/flatten__cn.html
该文档存在的问题:paddle.flatten_这个api无法使用,paddle提示没有这个api,但是官网给出了这个api,在位置的flatten_而不是flatten。
我还测试了对于多为tensor的flatten_发现可以用tensor.flatten_,不过这个可用的tensor.flatten_只是部分可以正确使用,比如我对一个三维张量tensor.shape=(2,3,2)执行tensor.flatten_(0,1)就会出现错误的结果,而tensor.flatten_(1,2)就是正确的结果,而且在tensor.flatten_(1,2)这个代码中,如果我改为tensor.flatten_(start_axis=1,stop_axis=2)就又会报错。
一名来自inner mongolia university 的学术垃圾研究生嘿嘿

请提出你的建议/提个PR修复这个问题 Please give your suggestion/update a PR to fix it

No response

@sealoongleft
Copy link
Author

多为改为多维

@sunzhongkai588
Copy link
Contributor

能否提供一下复现代码以及版本、环境信息

@sealoongleft
Copy link
Author

相关截图,如下,上面每个情况我都截图了,上传的顺序可能
报错2
报错flatten_
正确
正确2
是乱的,抱歉哈
api
flatten正确
报错1

@ooooo-create
Copy link
Contributor

ooooo-create commented Mar 27, 2024

如果我改为tensor.flatten_(start_axis=1,stop_axis=2)就又会报错。
image

这个应该是 a.flatten_() 里面不应该还包含 a

@sunzhongkai588 sunzhongkai588 transferred this issue from PaddlePaddle/docs Mar 27, 2024
@sealoongleft
Copy link
Author

对的,这个是敲错了,忽略这个图片,看别的图

@sealoongleft
Copy link
Author

@sunzhongkai588

@GGBond8488
Copy link
Contributor

@sealoongleft flatten_错误确定是相关的kernel有bug,我们会尽快修复

@sealoongleft
Copy link
Author

嗯嗯,我会继续使用paddle的,你们回复很快

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants