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

batch_size #53

Open
long123524 opened this issue Sep 15, 2021 · 3 comments
Open

batch_size #53

long123524 opened this issue Sep 15, 2021 · 3 comments

Comments

@long123524
Copy link

batch_size可以设置成其他值嘛?比如4,8,16等,为什么要是1呢

@Ann331
Copy link

Ann331 commented Nov 1, 2021

可以通过调整iter_size来设置 :
这个参数乘上你的train prototxt中的batch_size是你实际使用的batch size。 相当于读取batchsize*itersize个图像才做一下gradient decent。 这个参数可以规避由于gpu不足而导致的batchsize的限制 因为你可以用多个iteration做到很大的batch 即使单次batch有限
引用自https://blog.csdn.net/sdlypyzq/article/details/84030312

@long123524
Copy link
Author

谢谢你的回答,我尝试设置batch_size为8,但是得到的loss非常大,几万,而且结果是全黑的,这是为什么呢

@blucher0000
Copy link

谢谢你的回答,我尝试设置batch_size为8,但是得到的loss非常大,几万,而且结果是全黑的,这是为什么呢

请问大佬是怎样改的batch_size,有没有修改83行 assert len(test_list) == len(test_loader), "%d vs %d" % (len(test_list), len(test_loader))

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