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

报错:RuntimeError: The size of tensor a (80) must match the size of tensor b (44) at non-singleton dimension 3,这个维度对不上要改哪里呢 #7

Open
tengfei1998 opened this issue Sep 21, 2022 · 2 comments

Comments

@tengfei1998
Copy link

No description provided.

@chairman-lu
Copy link

会改了吗 蹲

@chairman-lu
Copy link

嗨嗨嗨兄弟我找到错了,44应该是你用的数据集的class数量吧
image
在teacher.py里面,teacher模型在初始化的时候根本没用到nc参数,所以默认直接用的80,所以前向传播出来的值的那个维度就是80。所以把teacher.py里的初始化按照train_distill里面初始化student模型的方法重写一遍就好了

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