-
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
[xdoctest] reformat example code with google style in No.339-No.343 #57087
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
>>> import paddle | ||
>>> import paddle.base as base | ||
>>> paddle.enable_static() | ||
>>> startup_prog = base.Program() |
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.
能不用(原)fluid 就不用
- Program -> paddle.static.Program
>>> x = paddle.static.data(name='x', shape=[3, 2, 1]) | ||
>>> # print the dimension of the Variable | ||
>>> print(x.ndimension()) | ||
<bound method monkey_patch_variable.<locals>.<lambda> of var x : LOD_TENSOR.shape(3, 2, 1).dtype(float32).stop_gradient(True)> |
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.
都加 ()
了还是 method 么?需要确认下
>>> x = paddle.static.data(name='x', shape=[3, 2, 1]) | ||
>>> # print the dimension of the Variable | ||
>>> print(x.dim()) | ||
<bound method monkey_patch_variable.<locals>.<lambda> of var x : LOD_TENSOR.shape(3, 2, 1).dtype(float32).stop_gradient(True)> |
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.
LGTMeow 🐾
PR types
Others
PR changes
Others
Description
修改如下文件的示例代码为新的格式,并通过 xdoctest 检查:
其中:
@sunzhongkai588 @SigureMo @megemini