-
Notifications
You must be signed in to change notification settings - Fork 5.8k
[xdoctest][task 114] Reformat example code with google style in python/paddle/nn/functional/vision.py #56230
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
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
✅ This PR's description meets the template requirements! |
Tensor(shape=[1, 6, 1, 1], dtype=float32, place=Place(cpu), stop_gradient=True, | ||
[[[[0. ]], | ||
[[0.10000000]], | ||
[[0.20000000]], | ||
[[0.30000001]], | ||
[[0.40000001]], | ||
[[0.50000000]]]]) |
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.
整体缩进层级 -1 吧,Tensor
的 T
与 >>>
的第一个 >
对齐
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里(如 Net 网络打印)是与 print 单词对齐的。对于Tensor是与 >>> 第一个 > 对齐,似乎不太一致呢。
我先按照这里的意见缩进-1吧,好像我文件内自己就没有对齐😓
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.
这个有什么规范么?
输出统一与 >
对齐吧,不要与语句开始对齐
[[0.50000000]]]]) | ||
>>> y = F.channel_shuffle(x, 3) | ||
>>> print(y) | ||
Tensor(shape=[1, 6, 1, 1], dtype=float32, place=Place(cpu), 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.
好哒,已修复~~
Tensor(shape=[1, 1, 3, 4], dtype=float64, place=Place(cpu), stop_gradient=True, | ||
[[[[ 0.34000000, 0.01600000, 0.08600000, -0.44800000], | ||
[ 0.55000000, -0.07600000, 0.35000000, 0.59000000], | ||
[ 0.59600000, 0.38000000, 0.52000000, 0.24000000]]]]) |
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.
好哒,已修复
>>> x = paddle.randn([2, 1, 12, 12]) | ||
>>> out = F.pixel_unshuffle(x, 3) | ||
>>> print(out.shape) | ||
>>> # [2, 9, 4, 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.
这里作为输出进行比较吧
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 🐾
…n/paddle/nn/functional/vision.py (PaddlePaddle#56230) * [xdoctest][task 114] test=docs_preview * test=document_fix * test=document_fix * adjust indent --------- Co-authored-by: SigureMo <sigure.qaq@gmail.com>
PR types
Others
PR changes
Docs
Description
对应tracking issue: #55629
预览链接: