CycleGAN-tensorflow icon indicating copy to clipboard operation
CycleGAN-tensorflow copied to clipboard

max_size parameter, does it impact training

Open mark-joe opened this issue 6 years ago • 2 comments

Not really an issue, I'm just puzzled where max_size is used for. It serves as the size of an ImagePool pool and is used to store 'fake outputs'. Used here:

` # Update G network and record fake outputs fake_A, fake_B, _, summary_str = self.sess.run( [self.fake_A, self.fake_B, self.g_optim, self.g_sum], feed_dict={self.real_data: batch_images, self.lr: lr}) self.writer.add_summary(summary_str, counter) [fake_A, fake_B] = self.pool([fake_A, fake_B])

            # Update D network
            _, summary_str = self.sess.run(
                [self.d_optim, self.d_sum],
                feed_dict={self.real_data: batch_images,
                           self.fake_A_sample: fake_A,
                           self.fake_B_sample: fake_B,
                           self.lr: lr})
            self.writer.add_summary(summary_str, counter)

` Does the size influence training? Default it is set to 50. Any ideas on this? Thanks!

mark-joe avatar Jun 05 '18 19:06 mark-joe

Hello, I have the same question as you. Could you have solved it?

Deeplearning20 avatar Jun 08 '18 13:06 Deeplearning20

The original cycle_gan paper adopts this idea to keep a image buffer that stores 50 previously created images.Yet I have no idea why it works

starcream avatar Jan 13 '20 07:01 starcream