Skip to content
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

resnet34最后的全连接层问题 #230

Open
superhero-7 opened this issue Feb 21, 2021 · 2 comments
Open

resnet34最后的全连接层问题 #230

superhero-7 opened this issue Feb 21, 2021 · 2 comments

Comments

@superhero-7
Copy link

在resnet34中最后用于分类的全连接实现是这样的:
self.fc = nn.Linear(512, num_classes)
想问一下这里的输入特征维数512应该是算出来的吧,受输入图片大小影响吧?

@timmmGZ
Copy link

timmmGZ commented Mar 2, 2021

在resnet34中最后用于分类的全连接实现是这样的:
self.fc = nn.Linear(512, num_classes)
想问一下这里的输入特征维数512应该是算出来的吧,受输入图片大小影响吧?

正解,所以输入图片时要resize

@TanSongBai
Copy link

thank you! I also find this problem and solve it by your idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants