(self, z_mu=None)
Generate data by sampling from latent space.

        If z_mu is not None, data for this point in latent space is generated.
        Otherwise, z_mu is drawn from prior in latent space.

        Note: This maps to mean of the distribution; we could alternatively
        sample from the Gaussian distribution.
Generate data by sampling from latent space.
Generate data by sampling from latent space .
def generate(self, z_mu=None):
        """Generate data by sampling from latent space.

        If z_mu is not None, data for this point in latent space is generated.
        Otherwise, z_mu is drawn from prior in latent space.

        Note: This maps to mean of the distribution; we could alternatively
        sample from the Gaussian distribution.
        """
        if z_mu is None:
            z_mu = self.random_state.normal(
                size=(self.batch_size, self.net_arch['n_z']))
            return self.sess.run(
                self.x_reconstr_mean, feed_dict={
                    self.z: z_mu})
        else:
            z_mu = np.reshape(z_mu, (1, self.net_arch['n_z']))
            z = np.repeat(z_mu, self.batch_size, axis=0)
            return self.sess.run(self.x_reconstr_mean, feed_dict={self.z: z})
def generate ( self , z_mu = None ) : if z_mu is None : z_mu = self . random_state . normal ( size = ( self . batch_size , self . net_arch [ 'n_z' ] ) ) return self . sess . run ( self . x_reconstr_mean , feed_dict = { self . z : z_mu } ) else : z_mu = np . reshape ( z_mu , ( 1 , self . net_arch [ 'n_z' ] ) ) z = np . repeat ( z_mu , self . batch_size , axis = 0 ) return self . sess . run ( self . x_reconstr_mean , feed_dict = { self . z : z } )