-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
fix: fix docstring issue #60962
fix: fix docstring issue #60962
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
要严格遵守模板,否则 CheckPRTemplate 过不了的 |
python/paddle/base/executor.py
Outdated
@@ -1203,13 +1203,13 @@ class Executor: | |||
|
|||
>>> # Run the main program directly without compile. | |||
>>> x = numpy.random.random(size=(10, 1)).astype('float32') | |||
>>> loss_data, = exe.run(train_program, feed={"X": x}, fetch_list=[loss.name]) |
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.
loss_data,
多了个逗号
逗号不能删,这代表对单个结果进行 unpack
比如
(x, y, z) = exe.run(..., fetch_list=[x_var, y_var, z_var])
(x, y) = exe.run(..., fetch_list=[x_var, y_var])
(x, ) = exe.run(..., fetch_list=[x_var])
# 这里逗号怎么能删呢?删了的话拿到的不是 x,而是 (x, )
这里是静态图执行器最顶层的文档,很多同学都会参考这里的写法,所以这里一定不能改错
文档评测只是用户个人理解而已,很明显这位用户理解有误,类似问题应当仔细甄别
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.
抱歉没有做好甄别,这就去 discard
已修改 pr 格式 |
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.
PR types
Bug fixes
PR changes
Docs
Description
paddle.transpose
第一个代码块,增加注释说明用途(说清楚例子是干嘛的)