(self, layer_input, layer_dim)
return x_reconstr_mean
Define the generator network.

        The probabilistic decoder (decoder network) maps points in latent
        space onto a Bernoulli distribution in data space. The transformation
        is parameterized and can be learned.

        Parameters
        ----------
        layer_dim : list
            Number of neurons for each layer of the generator network.

        Returns
        -------
        x_reconstr_mean : Tensor
            Mean of the reconstructed data.
Define the generator network.
Define the generator network .
def _generator_network(self, layer_input, layer_dim):
        """Define the generator network.

        The probabilistic decoder (decoder network) maps points in latent
        space onto a Bernoulli distribution in data space. The transformation
        is parameterized and can be learned.

        Parameters
        ----------
        layer_dim : list
            Number of neurons for each layer of the generator network.

        Returns
        -------
        x_reconstr_mean : Tensor
            Mean of the reconstructed data.
        """
        for layer_i, n_output in enumerate(reversed(layer_dim[1:])):
            n_input = int(layer_input.get_shape()[1])
            W = tf.Variable(self.W_init_fct(
                [n_input, n_output]), dtype=tf.float32)
            b = tf.Variable(self.b_init_fct([n_output]), dtype=tf.float32)
            output = self.transfer_fct(tf.add(tf.matmul(layer_input, W), b))
            layer_input = output

        n_dims = self.net_arch['hidden_dim'][0]

        W_out_mean = tf.Variable(self.W_init_fct(
            [n_dims, self.net_arch['n_output']]))
        b_out_mean = tf.Variable(self.b_init_fct(
            [self.net_arch['n_output']], dtype=tf.float32))

        x_reconstr_mean = tf.nn.sigmoid(tf.add(tf.matmul(
            layer_input, W_out_mean), b_out_mean))
        return x_reconstr_mean
def _generator_network ( self , layer_input , layer_dim ) : for layer_i , n_output in enumerate ( reversed ( layer_dim [ 1 : ] ) ) : n_input = int ( layer_input . get_shape ( ) [ 1 ] ) W = tf . Variable ( self . W_init_fct ( [ n_input , n_output ] ) , dtype = tf . float32 ) b = tf . Variable ( self . b_init_fct ( [ n_output ] ) , dtype = tf . float32 ) output = self . transfer_fct ( tf . add ( tf . matmul ( layer_input , W ) , b ) ) layer_input = output n_dims = self . net_arch [ 'hidden_dim' ] [ 0 ] W_out_mean = tf . Variable ( self . W_init_fct ( [ n_dims , self . net_arch [ 'n_output' ] ] ) ) b_out_mean = tf . Variable ( self . b_init_fct ( [ self . net_arch [ 'n_output' ] ] , dtype = tf . float32 ) ) x_reconstr_mean = tf . nn . sigmoid ( tf . add ( tf . matmul ( layer_input , W_out_mean ) , b_out_mean ) ) return x_reconstr_mean