-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Remove reduntant numpy input in Example code (test=document_fix) #47555
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
f3c7004
to
bf29f25
Compare
bf29f25
to
08b2d10
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good job!
LGTM
由于第一次 commit 的 PR-CI-Coverage 没有通过,所以额外添加了一次 commit,顺便补充了一个漏网之鱼 python/paddle/nn/layer/common.py 。(该示例代码中采用 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
PR types
Others
PR changes
Docs
Describe
本次 PR 针对所有 paddle api 文档中出现的以下问题,进行了统一处理:
x = np.functions
+paddle.to_tensor(x)
的方式创建函数输入, 如:处理方式为移除 numpy 输入,统一采用 Paddle API,对于不同
Numpy
方法构建的输入,其对应的修改方式如下:np.random.uniform
paddle.uniform
np.arange
paddle.arange
np.random.randint
paddle.randint
np.random.rand, np.random.random
paddle.rand
np.array
特殊情况 1:
对于以下 Paddle API:
除了修改 numpy 问题外,也对示例代码样式做了微小调整,包括以备注方式添加(或修改)输出结果, 将
np.random
随机输入改为了自定义的固定输入等。特殊情况 2:
对于以下 Paddle API,由于特殊原因并未修改对应的 Numpy 问题:
Paddle/python/paddle/distributed/fleet/recompute/recompute.py line 385
:跑不通示例代码,不确定是否是单 GPU 环境的问题。Paddle/python/paddle/distributed/utils/moe_utils.py line 20,150
:同上Paddle/python/paddle/sparse/nn/functional/activation.py line 61
:原示例代码报错:未找到paddle.sparse
Paddle/python/paddle/sparse/nn/layer/activation.py line 60
:原示例代码报错:未找到paddle.sparse
Paddle/python/paddle/fft.py
:未找到np.mgrid
等方法对应的 Paddle API。Paddle/python/paddle/fluid
下所有 Paddle API