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

torchslim中在cifar10上的示例代码输出为64维,而不是10维 #13

Open
wanghan0501 opened this issue Aug 5, 2022 · 3 comments

Comments

@wanghan0501
Copy link

问题如题,想请教下为什么最后一层使用conv而不是linear,改成conv会导致最终输出维度不定

self.linear=nn.Conv2d(self.base_channel*4*block.expansion,self.base_channel*4*block.expansion,1,1,0)
# self.linear = nn.Linear(self.base_channel*4*block.expansion, num_classes)
@gdh1995
Copy link
Collaborator

gdh1995 commented Aug 5, 2022

有道理啊。感觉这行是测试用的代码,提交时没改回去。可以手动改,或者直接用标准的 resnet,比如 torchvision.models.resnet18

@wanghan0501
Copy link
Author

感谢,我尝试下。测试trt的时候被64维度弄懵逼了,还在想为什么会这样...

@wanghan0501
Copy link
Author

还有一个问题,目前这个库不支持pytorch1.12版本,升级到1.12运行qat会报错

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

2 participants