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

修改COPY-FROM No. 1 others #5960

Merged

Conversation

Ainavo
Copy link
Contributor

@Ainavo Ainavo commented Jun 23, 2023

将代码块 .. code-block:: 使用 COPY-FROM 指令代替

PADDLEPADDLE_PR=55411

@paddle-bot
Copy link

paddle-bot bot commented Jun 23, 2023

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

@SigureMo SigureMo requested review from SigureMo and removed request for SigureMo June 24, 2023 15:44
@luotao1 luotao1 added the HappyOpenSource 快乐开源活动issue与PR label Jun 26, 2023
@Ainavo
Copy link
Contributor Author

Ainavo commented Jun 28, 2023

API 对应文档位置 备注
Tensor.clear_grad paddlepaddle\Paddle\paddle\fluid\pybind\imperative.cc
Tensor.dtype
Tensor.grad
Tensor.is_leaf paddlepaddle\Paddle\paddle\fluid\pybind\imperative.cc
Tensor.item(*args) paddlepaddle\Paddle\python\paddle\fluid\dygraph\tensor_patch_methods.py
Tensor.name
Tensor.ndim
Tensor.persistable
Tensor.place
Tensor.shape API:paddle.shape
Tensor.stop_gradient
Tensor.astype(dtype)
Tensor.backward(grad_tensor=None, retain_graph=False) paddlepaddle\Paddle\python\paddle\fluid\dygraph\tensor_patch_methods.py
Tensor.clear_gradient() paddlepaddle\Paddle\python\paddle\fluid\framework.py
Tensor.clone() paddlepaddle\Paddle\paddle\fluid\pybind\imperative.cc
Tensor.cosh(name=None) API:paddle.cosh
Tensor.cpu() paddlepaddle\Paddle\paddle\fluid\pybind\imperative.cc
Tensor.cuda(device_id=None, blocking=False) https://github.com/PaddlePaddle/Paddle/blob/4a4a32ee982b4eac6058261a31a79f3a2ae4c845/paddle/fluid/pybind/imperative.cc#L1666 示例代码不一致
Tensor.detach() https://github.com/PaddlePaddle/Paddle/blob/4a4a32ee982b4eac6058261a31a79f3a2ae4c845/paddle/fluid/pybind/imperative.cc#L1259 示例代码不一致
Tensor.dim()
Tensor.element_size() paddlepaddle\Paddle\paddle\fluid\pybind\imperative.cc
Tensor.exponential_(lam=1.0, name=None) paddlepaddle\Paddle\python\paddle\tensor\random.py
Tensor.fill_(x, value, name=None) paddlepaddle\Paddle\python\paddle\tensor\manipulation.py
Tensor.zero_(x, name=None) paddlepaddle\Paddle\python\paddle\tensor\manipulation.py
Tensor.fill_diagonal_(x, value, offset=0, wrap=False, name=None) https://github.com/PaddlePaddle/Paddle/blob/4a4a32ee982b4eac6058261a31a79f3a2ae4c845/python/paddle/tensor/manipulation.py#L913 示例代码不一致
Tensor.fill_diagonal_tensor(x, y, offset=0, dim1=0, dim2=1, name=None) paddlepaddle\Paddle\python\paddle\tensor\manipulation.py
Tensor.fill_diagonal_tensor_(x, y, offset=0, dim1=0, dim2=1, name=None) paddlepaddle\Paddle\python\paddle\tensor\manipulation.py
Tensor.gradient()
Tensor.ndimension()
Tensor.numpy() paddlepaddle\Paddle\paddle\fluid\pybind\imperative.cc
Tensor.pin_memory(y, name=None) https://github.com/PaddlePaddle/Paddle/blob/4a4a32ee982b4eac6058261a31a79f3a2ae4c845/paddle/fluid/pybind/imperative.cc#L1632 示例代码不一致
Tensor.register_hook(hook) Paddle\python\paddle\fluid\dygraph\tensor_patch_methods.py
Tensor.set_value(value) paddlepaddle\Paddle\python\paddle\fluid\dygraph\tensor_patch_methods.py
Tensor.sinh(name=None) API:paddle.sinh
Tensor.uniform_(min=-1.0, max=1.0, seed=0, name=None) paddlepaddle\Paddle\python\paddle\tensor\random.py

docs/api/paddle/LazyGuard_cn.rst Outdated Show resolved Hide resolved
docs/api/paddle/Tensor_cn.rst Outdated Show resolved Hide resolved
docs/api/paddle/add_n_cn.rst Outdated Show resolved Hide resolved
docs/api/paddle/grad_cn.rst Outdated Show resolved Hide resolved
docs/api/paddle/round_cn.rst Outdated Show resolved Hide resolved
docs/api/paddle/scatter_cn.rst Show resolved Hide resolved
docs/api/paddle/squeeze_cn.rst Outdated Show resolved Hide resolved
docs/api/paddle/stack_cn.rst Outdated Show resolved Hide resolved
@Ainavo
Copy link
Contributor Author

Ainavo commented Jul 17, 2023

@sunzhongkai588 辛苦孙师傅有空 review 一下

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
@SigureMo @megemini Tensor_cn.rst下的代码示例就不改成copy from形式了,因为改动难度比较大(示例存在于c++端)。建议直接skip叭

@luotao1 luotao1 merged commit d44de7d into PaddlePaddle:develop Jul 18, 2023
@SigureMo SigureMo deleted the modify_code-block_to_copy-from branch July 18, 2023 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants