-
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
[xdoctest] reformat example code with google style in No.297、298、302 #56861
Conversation
你的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.
这个文件 #56826 已经改过了,需要恢复
python/paddle/nn/layer/conv.py
Outdated
@@ -515,6 +515,7 @@ class Conv1DTranspose(_ConvNd): | |||
>>> print(y) | |||
Tensor(shape=[1, 1, 5], dtype=float32, place=Place(cpu), stop_gradient=False, | |||
[[[60., 16., 99., 75., 4. ]]]) | |||
|
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.
这里为什么要改?需要恢复
python/paddle/incubate/passes/ir.py
Outdated
>>> import paddle | ||
>>> from paddle.fluid.ir import RegisterPass | ||
|
||
>>> @RegisterPass | ||
>>> def multi_add_to_addn(): | ||
... def pattern(x, y, z): | ||
... return paddle.add(paddle.add(x, y), z) | ||
... def replace(x, y, z): | ||
... return paddle.add_n([x, y, z]) | ||
... return pattern, replace |
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.
需要加缩进
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.
是我看错了么,这个文件没恢复啊
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.
恢复了,因为不需要改
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.
这个文件仍然有 diff,需要 merge develop 确保没有 diff
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.
sure?我是直接用的paddle官方的py文件替换的
是解决冲突、恢复修改,不是删文件 |
... # Call the bfgs method to optimize the loss, note that the third parameter returned represents the weight | ||
... w_update = paddle.incubate.optimizer.functional.minimize_bfgs(loss, w)[2] | ||
... # Use paddle.assign to update parameters in place | ||
... paddle. assign(w_update, w) |
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.
... paddle. assign(w_update, w) | |
... paddle.assign(w_update, w) |
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.
LGTMeow 🐾
…addlePaddle#56861) * 更改相关文件 * Update ir.py * 恢复相关文件 * Update ir.py * Delete python/paddle/incubate/optimizer/modelaverage.py * Delete modelaverage.py * 尝试恢复文件 * Revert "尝试恢复文件" This reverts commit 8a263cf. * Revert "恢复相关文件" This reverts commit 24249b8. * Revert "Revert "尝试恢复文件"" This reverts commit 1b833d6. * Revert "Revert "Revert "尝试恢复文件""" This reverts commit 64b3a81. * Revert "Delete python/paddle/incubate/optimizer/modelaverage.py" This reverts commit 6198629. * Revert "更改相关文件" This reverts commit a5ba675. * Apply suggestions from code review --------- Co-authored-by: Nyakku Shigure <sigure.qaq@gmail.com>
PR types
Others
PR changes
Others
Description
修改如下文件的示例代码,使其通过
xdoctest
检查:Related links