GAN/Architectures/models/infogan.py
def build_gan(self):
        """override defining of the combined generator and discriminator model, for updating the generator"""
        # make weights in the discriminator (some shared with the q model) as not trainable
        self.d_model.trainable = False
        # connect g outputs to d inputs
        d_output = self.d_model(self.g_model.output)
        # connect g outputs to q inputs
        q_output = self.q_model(self.g_model.output)
        # define composite model
        self.gan_model = Model(self.g_model.input, [d_output, q_output])
        # compile model
        opt = Adam(lr=0.0002, beta_1=0.5)
        self.gan_model.compile(loss=['binary_crossentropy', 'categorical_crossentropy'], optimizer=opt)
override defining of the combined generator and discriminator model, for updating the generator
override defining of the combined generator and discriminator model, for updating the generator
override defining of the combined generator and discriminator model for updating the generator
def build_gan(self):
        self.d_model.trainable = False
        d_output = self.d_model(self.g_model.output)
        q_output = self.q_model(self.g_model.output)
        self.gan_model = Model(self.g_model.input, [d_output, q_output])
        opt = Adam(lr=0.0002, beta_1=0.5)
        self.gan_model.compile(loss=['binary_crossentropy', 'categorical_crossentropy'], optimizer=opt)
def build_gan ( self ) : self . d_model . trainable = False d_output = self . d_model ( self . g_model . output ) q_output = self . q_model ( self . g_model . output ) self . gan_model = Model ( self . g_model . input , [ d_output , q_output ] ) opt = Adam ( lr = 0.0002 , beta_1 = 0.5 ) self . gan_model . compile ( loss = [ 'binary_crossentropy' , 'categorical_crossentropy' ] , optimizer = opt )
override defining of the combined generator and discriminator model, for updating the generator
override defining of the combined generator and discriminator model for updating the generator
"""override defining of the combined generator and discriminator model, for updating the generator""" # make weights in the discriminator (some shared with the q model) as not trainable # connect g outputs to d inputs # connect g outputs to q inputs # define composite model # compile model
self