-
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
API improvement for nn.functional.upsample #61974
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
@@ -906,6 +906,13 @@ def upsample( | |||
[2, 3, 12, 12] | |||
|
|||
""" | |||
if data_format == 'NCHW': |
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.
- data_format默认值可以为None,在None的情况下,1D默认NCW,2D默认NCHW,3D默认NCDHW。
- 直接在interpolate里修改吧,在最底层改,上层的API都会支持
- 这些逻辑要在API文档里写清楚,包括所有涉及到的API:interpolate、upsampe、Upsample等,参数里对x的描述、对data_format的描述都需要写清楚新的逻辑
后续的API改动注意更新英文API文档,合入后记得更新doc里的中文API文档
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
the output will be consistent with that of the input. An optional string from:`"NCW"`, | ||
`"NWC"`, `"NCHW"`, `"NHWC"`, `"NCDHW"`, `"NDHWC"`. The default value is None. | ||
When :attr:`data_format` is not specified, it will be automatically inferred from the | ||
input shape of :attr:`x`. When :attr:`x` is a 3-D Tensor, :attr:`data_format` will be |
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.
input dimension
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.
LGTM , 记得中文文档同步更新~
PR types
Others
PR changes
APIs
Description
continue the work of: #56471