(self, in_samples, n_samples)
return samples
Generate samples via pseudo-Gibbs sampling.

        Parameters
        ----------
        in_samples : ndarray, shape (n_samples, n_features)
            Matrix containing the data from which to sample.
        n_samples : int
            Number of samples to generate.

        Returns samples.
Generate samples via pseudo-Gibbs sampling.
Generate samples via pseudo - Gibbs sampling .
def sample(self, in_samples, n_samples):
        """Generate samples via pseudo-Gibbs sampling.

        Parameters
        ----------
        in_samples : ndarray, shape (n_samples, n_features)
            Matrix containing the data from which to sample.
        n_samples : int
            Number of samples to generate.

        Returns samples.
        """
        if not hasattr(in_samples, "__len__"):
            in_samples = [in_samples]

        samples = np.empty(shape=(n_samples, self.net_arch['n_input']))
        for i in range(n_samples):
            if i == 0:
                # Choose a random sample as the initialization.
                in_sample = in_samples[
                    self.random_state.randint(
                        len(in_samples), size=1)]
                out_sample = self.sess.run(self.y, feed_dict={
                    self.x: in_sample
                })
            else:
                out_sample = self.sess.run(self.y, feed_dict={
                    self.x: samples[i - 1].reshape((1, -1))
                })
            samples[i] = out_sample

        return samples
def sample ( self , in_samples , n_samples ) : if not hasattr ( in_samples , "__len__" ) : in_samples = [ in_samples ] samples = np . empty ( shape = ( n_samples , self . net_arch [ 'n_input' ] ) ) for i in range ( n_samples ) : if i == 0 : # Choose a random sample as the initialization. in_sample = in_samples [ self . random_state . randint ( len ( in_samples ) , size = 1 ) ] out_sample = self . sess . run ( self . y , feed_dict = { self . x : in_sample } ) else : out_sample = self . sess . run ( self . y , feed_dict = { self . x : samples [ i - 1 ] . reshape ( ( 1 , - 1 ) ) } ) samples [ i ] = out_sample return samples