Esempio n. 1
0
File: train.py Progetto: yyht/gan
def main(_):
    hparams = train_lib.HParams(FLAGS.batch_size, FLAGS.patch_size,
                                FLAGS.train_log_dir, FLAGS.generator_lr,
                                FLAGS.discriminator_lr,
                                FLAGS.max_number_of_steps, FLAGS.adam_beta1,
                                FLAGS.adam_beta2, FLAGS.gen_disc_step_ratio,
                                FLAGS.tf_master, FLAGS.ps_replicas, FLAGS.task)
    train_lib.train(hparams)
Esempio n. 2
0
 def setUp(self):
     super(TrainTest, self).setUp()
     self.hparams = train_lib.HParams(
         batch_size=6,
         patch_size=128,
         train_log_dir='/tmp/tfgan_logdir/stargan/',
         generator_lr=1e-4,
         discriminator_lr=1e-4,
         max_number_of_steps=1000000,
         adam_beta1=0.5,
         adam_beta2=0.999,
         gen_disc_step_ratio=0.2,
         tf_master='',
         ps_replicas=0,
         task=0)
Esempio n. 3
0
    def setUp(self):
        super(TrainTest, self).setUp()

        # Force the TF lazy loading to kick in before mocking this out below.
        _ = tf.train.get_or_create_global_step()

        self.hparams = train_lib.HParams(
            batch_size=6,
            patch_size=128,
            train_log_dir='/tmp/tfgan_logdir/stargan/',
            generator_lr=1e-4,
            discriminator_lr=1e-4,
            max_number_of_steps=1000000,
            adam_beta1=0.5,
            adam_beta2=0.999,
            gen_disc_step_ratio=0.2,
            tf_master='',
            ps_replicas=0,
            task=0)