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

I am a novice, may I ask when training, the bigger the batch_size is better or better 1 #238

Open
clxa opened this issue Sep 2, 2020 · 2 comments

Comments

@clxa
Copy link

clxa commented Sep 2, 2020

I am a novice, may I ask when training, the bigger the batch_size is better or better 1

@pranavbudhwant
Copy link

Let's consider the extreme scenarios:

  1. The largest batch size, which is equal to the size of your training data - the gradient updates will be slower but less noisy.
  2. The smallest batch size, which is equal to 1 - the gradient updates will be quick, but it'll be noisier.

So ideally you want to find a batch size where the updates aren't that noisy but are also fast.

@clxa
Copy link
Author

clxa commented Sep 5, 2020

让我们考虑一下极端情况:

  1. 最大批次大小,等于训练数据的大小-梯度更新将较慢,但噪声较小。
  2. 最小批量大小,等于1-梯度更新将很快,但是会更嘈杂。

因此,理想情况下,您希望找到一个批量大小,使更新不那么嘈杂但又很快。

Thank you for your reply. If my trainB is all of the same style images, can I ignore the batch -- size

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