-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
[Question] Tensor inplace-api 的使用方式与文档展示 #63330
Comments
感谢你的意见,从inplace 语义的角度出发,Tensor.xxx_ 形式的api 更合适,我们将会在后面的版本中将paddle.xxx_ 公开API转为非公开API,原有的调用路径也仍然保留。 |
❤️感谢答复~
|
1.是的,中文文档里面的可以统一放在paddle.Tensor下了 |
这个中文文档是统一放在 https://github.com/PaddlePaddle/docs/blob/develop/docs/api/paddle/Tensor_cn.rst 这单一文件里吗,(这样可能会导致官网搜索 inplace api 搜不到、并且此文档太长) 同时英文文档对于 Tensor 方法的展示除了在 paddle.Tensor 单一文件下,还有 paddle.Tensor 这一目录下,进行展示,这样是不是重复了(虽然加了 paddle.Tensor 这一目录可以方便用户搜索 inplace_api,但是此目录似乎用处不大,因为目前只会显示那些没有暴露到 paddle.xxx 中的 Tensor 方法),中文文档该对齐哪一种方式呢?
是否需要由社区开发者来屏蔽paddle.{inplace} 这个路径 |
请提出你的问题 Please ask your question
参照 issue63054,此 issue 展示了中文 api 文档下的
paddle.flatten_
无法使用的问题。透露出两个问题,一个是 api 文档对于 inplace-api 是如何进行展示的,以及 inplace-api 是否需要暴露在 paddle 下。api 文档现状(对于Tensor 相关)
中文 api 文档,通过 rst 文件手动撰写 api 文档。其中对于 paddle 下的 api (包括 inplace-api),都是存放在 paddle 目录下。
- paddle - amp - ... - ... - add_cn.rst - add__cn.rst - ... - Tensor_cn.rst - ... # 所有 inplace-api 在文档中都是暴露在 paddle 下
而英文 api 文档目前通过不同模块和文件中的 _all_ 属性中的元素进行公开文档展示(添加到 _all_ 才会展示在官网中)
<Paddle\python\paddle\__init__.py> ... _all_ = [ 'iinfo', ... 'cos', 'add', ... ] ... # 导入 __init__.py(以及没有导入) 却没有加入 _all_ 的 api 文档展示在 paddle.Tensor 下
inpalce-api 使用方式
通过 dir(paddle) 以及 dir(paddle.Tensor) 发现些许 inplace-api 并没有暴露到 paddle 下(没有导入在 paddle 的
__init__.py
中).问题
api 列表
The text was updated successfully, but these errors were encountered: