Skip to content

Conversation

yangguohao
Copy link
Contributor

add apply api docs

Copy link

paddle-bot bot commented Dec 28, 2023

感谢你贡献飞桨文档,文档预览构建中,Docs-New 跑完后即可预览,预览链接:http://preview-pr-6429.paddle-docs-preview.paddlepaddle.org.cn/documentation/docs/zh/api/index_cn.html
预览工具的更多说明,请参考:飞桨文档预览工具

@yangguohao
Copy link
Contributor Author

yangguohao commented Dec 28, 2023

@luotao1 涛姐麻烦了

Comment on lines 544 to 551
.. code-block:: python

x = paddle.to_tensor([[0.3, 0.5, 0.1],
[0.9, 0.9, 0.7],
[0.4, 0.8, 0.2]])
f = lambda x: 3*x+2
y = x.apply(f)
print(y)
Copy link
Collaborator

Choose a reason for hiding this comment

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

用copy-from的形式,中英文代码保持一致

Suggested change
.. code-block:: python
x = paddle.to_tensor([[0.3, 0.5, 0.1],
[0.9, 0.9, 0.7],
[0.4, 0.8, 0.2]])
f = lambda x: 3*x+2
y = x.apply(f)
print(y)
COPY-FROM: paddle.Tensor.apply

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@@ -625,7 +625,7 @@
梳理了`torch.Tensor.XX`类 API 的 PyTorch-PaddlePaddle API 映射列表。

| 序号 | PyTorch API | PaddlePaddle API | 备注 |
|-----| --- | --- | --- |
-----|-----| --- | --- | --- |
Copy link
Collaborator

Choose a reason for hiding this comment

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

md格式确认下?预览是错的
图片

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Copy link
Collaborator

@sunzhongkai588 sunzhongkai588 left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants