GAN/Architectures/models/infogan.py
def generate_latent_points(self, n_samples):
        """generate points in latent space as input for the generator. we concatonate with control codes"""
        # generate points in the latent space
        latent_points = super().generate_latent_points(n_samples)
        # reshape into a batch of inputs for the network
        latent_points = latent_points.reshape(n_samples, self.latent_dim)

        # generate categorical codes
        cat_codes = np.random.randint(0, self.n_cat, n_samples)
        # one hot encode
        cat_codes = to_categorical(cat_codes, num_classes=self.n_cat)
        # concatenate latent points and control codes
        z_input = np.hstack((latent_points, cat_codes))
        return [z_input, cat_codes]
generate points in latent space as input for the generator. we concatonate with control codes
generate points in latent space as input for the generator. we concatonate with control codes
generate points in latent space as input for the generator . we concatonate with control codes
def generate_latent_points(self, n_samples):
        latent_points = super().generate_latent_points(n_samples)
        latent_points = latent_points.reshape(n_samples, self.latent_dim)
        cat_codes = np.random.randint(0, self.n_cat, n_samples)
        cat_codes = to_categorical(cat_codes, num_classes=self.n_cat)
        z_input = np.hstack((latent_points, cat_codes))
        return [z_input, cat_codes]
def generate_latent_points ( self , n_samples ) : latent_points = super ( ) . generate_latent_points ( n_samples ) latent_points = latent_points . reshape ( n_samples , self . latent_dim ) cat_codes = np . random . randint ( 0 , self . n_cat , n_samples ) cat_codes = to_categorical ( cat_codes , num_classes = self . n_cat ) z_input = np . hstack ( ( latent_points , cat_codes ) ) return [ z_input , cat_codes ]
generate points in latent space as input for the generator.
generate points in latent space as input for the generator .
"""generate points in latent space as input for the generator. we concatonate with control codes""" # generate points in the latent space # reshape into a batch of inputs for the network # generate categorical codes # one hot encode # concatenate latent points and control codes
self
n_samples