Skip to content

Conversation

Asthestarsfalll
Copy link
Contributor

PR Category

User Experience

PR Types

Improvements

Description

Add type annotations for paddle/vision/models/resnet.py

Copy link

paddle-bot bot commented Jun 26, 2024

你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@paddle-bot paddle-bot bot added the contributor External developers label Jun 26, 2024
@luotao1 luotao1 added the HappyOpenSource 快乐开源活动issue与PR label Jun 26, 2024
groups: int = 1,
base_width: int = 64,
dilation: int = 1,
norm_layer: type[nn.BatchNorm2D] | None = None,
Copy link
Member

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 就没意义了吧?

还是说意义就是用来区分 NoneBatchNorm2D

Copy link
Contributor Author

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,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个可以是其他 Layer 吗?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

也可以 稍后修改

SigureMo
SigureMo previously approved these changes Jun 27, 2024
Copy link
Member

@SigureMo SigureMo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTMeow 🐾

@SigureMo
Copy link
Member

SigureMo commented Jun 27, 2024

啊不对,Static check 有点问题得看看(刚刚手快直接 rerun 了

@SigureMo SigureMo merged commit 10a4dcc into PaddlePaddle:develop Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor External developers HappyOpenSource 快乐开源活动issue与PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants