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

关于batchsize对训练和测试的影响 #30

Open
NovemberSun opened this issue Dec 3, 2020 · 1 comment
Open

关于batchsize对训练和测试的影响 #30

NovemberSun opened this issue Dec 3, 2020 · 1 comment

Comments

@NovemberSun
Copy link

您好,我做了两个不同的实验。第一个是训练和测试的batchsize大小都为1(这样训练速度较慢);第二个是训练和测试的batchsize大小都为32;第二个实验的分类准确率比第一个实验低约2个百分点。
我在思考batchsize影响这么大的原因,一般来说batchsize增大可以增加模型泛化能力。但是在fastbert中,是否因为batchsize变大对推理阶段准确率影响较大?
不知道您有没有做过batchsize对训练测试影响的相关实验,或者有什么建议呢?

@NovemberSun
Copy link
Author

我后续做了对比实验,在微调阶段batchsize变大会增大模型分类准确率,在自蒸馏阶段batchsize变大会降低准确率,在测试阶段batchsize变化对实验结果无影响?在蒸馏阶段计算分支分类器和“老师分类器”的KL散度也是取的batchmean计算,应该不会有这样的影响呀?不知道您有没有遇到过这个问题

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

1 participant