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

How to set batch_size? and when to stop training? #206

Open
songbowang125 opened this issue Aug 26, 2022 · 0 comments
Open

How to set batch_size? and when to stop training? #206

songbowang125 opened this issue Aug 26, 2022 · 0 comments

Comments

@songbowang125
Copy link

Hi, I am using these codes on my own project and I got a few confusions since I am new on cGANs.

  1. the first one is how to set a suitable batch_size. Others said that batch_size=1 led to better perfomance. However, my training set is a bit larger (about 42k images, and another 8k images for test and validation). Should the batch_size kept 1 or setting a larger value, such as 128? For the first attemption, I used batch_size = 1 but the gen_loss increased fast within one epoch. However, when I set batch_size to 128, the gen_loss slowed down.

  2. so, here is the second question, when to stop training. I learned from some blogs that an ideal stopping condition was that the discriminator could not tell real and generated images, which means predict_fake = predict_real = 0.5. If I understood correctly, the gen_loss (-log(predict_fake)) should be about ~0.7, while the discri_loss ( -(log(predict_fake) + log(predict_real))) should be ~1.4. Is this the correct condition to stop training?

Hoping for your expert explanations. Thanks a lot

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