Exemple #1
0
    def step(self, samples):

        # descriminator inference using true images
        self.discriminator = model.Descriminator(FLAGS.batch_size, FLAGS.dc_dim)
        self.D1, D1_logits, D1_inter = self.discriminator.inference(samples)

        return self.D1
Exemple #2
0
    def step(self, images, z):
        self.generator = model.Generator(FLAGS.batch_size, FLAGS.gc_dim)
        self.G = self.generator.inference(z)

        # descriminator inference using true images
        self.discriminator_list = []
        self.D1_list = []
        self.D2_list = []
        D1_logits_list = []
        D2_logits_list = []
        D1_inter_list = []
        D2_inter_list = []
        self.samples = self.generator.sampler(z, reuse=True)
        for i in range(self.d_num):
            discriminator = model.Descriminator(FLAGS.batch_size, FLAGS.dc_dim)
            D1, D1_logits, D1_inter = discriminator.inference(images, num=i)
            # descriminator inference using sampling with G
            D2, D2_logits, D2_inter = discriminator.inference(self.G, reuse=True, num=i)
            self.D1_list.append(D1)
            self.D2_list.append(D2)
            D1_logits_list.append(D1_logits)
            D2_logits_list.append(D2_logits)
            D1_inter_list.append(D1_inter)
            D2_inter_list.append(D2_inter)
        return images, D1_logits_list, D2_logits_list, D1_inter_list, D2_inter_list
    def step(self, z):
        z_sum = tf.summary.histogram("z", z)

        self.generator = model.Generator(FLAGS.batch_size_v, FLAGS.gc_dim_v)
        self.G = self.generator.inference(z)

        # descriminator inference using true images
        self.discriminator = model.Descriminator(FLAGS.batch_size_v,
                                                 FLAGS.dc_dim_v)
        #self.D1, D1_logits = self.discriminator.inference(images)

        # descriminator inference using sampling with G
        self.samples = self.generator.sampler(z, reuse=True, trainable=False)
Exemple #4
0
    def step(self, images, z):
        z_sum = tf.summary.histogram("z", z)

        self.generator = model.Generator(FLAGS.batch_size, FLAGS.gc_dim)
        G = self.generator.inference(z)

        # descriminator inference using true images
        discriminator = model.Descriminator(FLAGS.batch_size, FLAGS.dc_dim)
        self.D1, D1_logits = discriminator.inference(images)

        # descriminator inference using sampling with G
        samples = self.generator.inference(z, reuse=True)
        self.D2, D2_logits = discriminator.inference(samples, reuse=True)

        d1_sum = tf.summary.histogram("d1", self.D1)
        d2_sum = tf.summary.histogram("d2", self.D1)
        G_sum = tf.summary.histogram("G", G)

        return images, D1_logits, D2_logits, G_sum, z_sum, d1_sum, d2_sum
Exemple #5
0
    def step(self, z):
        z_sum = tf.summary.histogram("z", z)

        self.generator = model.Generator(FLAGS.batch_size, FLAGS.gc_dim)
        self.G = self.generator.inference(z)

        # descriminator inference using true images
        self.discriminator = model.Descriminator(FLAGS.batch_size, FLAGS.dc_dim)
        #self.D1, D1_logits = self.discriminator.inference(images)

        # descriminator inference using sampling with G
        self.samples = self.generator.sampler(z, reuse=True)
        self.D2, D2_logits, D2_inter = self.discriminator.inference(self.G, reuse=False)

#        d1_sum = tf.summary.histogram("d1", self.D1)
        d2_sum = tf.summary.histogram("d2", self.D2)
        G_sum = tf.summary.histogram("G", self.G)

        # return images, D1_logits, D2_logits, G_sum, z_sum, d1_sum, d2_sum
        # return D2_logits, G_sum, z_sum, d1_sum, d2_sum
        return D2_logits, G_sum, z_sum, d2_sum