-
Notifications
You must be signed in to change notification settings - Fork 5.8k
[Typing][A-81] Add type annotations for paddle/vision/models/resnet.py
#65487
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提交成功,感谢你对开源项目的贡献! |
groups: int = 1, | ||
base_width: int = 64, | ||
dilation: int = 1, | ||
norm_layer: type[nn.BatchNorm2D] | None = None, |
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.
type[nn.Layer]
?这要是固定 nn.BatchNorm2D
就没意义了吧?
还是说意义就是用来区分 None
和 BatchNorm2D
?
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.
看代码ResNet里是写死为BatchNorm2D了,使用Layer也可以
inplanes: int, | ||
planes: int, | ||
stride: Size2 = 1, | ||
downsample: nn.Sequential | None = None, |
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.
这个可以是其他 Layer 吗?
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.
啊不对,Static check 有点问题得看看(刚刚手快直接 rerun 了 |
PR Category
User Experience
PR Types
Improvements
Description
Add type annotations for
paddle/vision/models/resnet.py