Module Expr Str Assign NameStore Str Assign NameStore Str Assign NameStore ListLoad Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Import alias Import alias Import alias identifier ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias alias Assign NameStore Call NameLoad AttributeLoad NameLoad attr ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Expr Str If Call NameLoad NameLoad Str body Return AttributeLoad NameLoad attr orelse Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If CompareIsNot Call AttributeLoad NameLoad attr NameLoad body Raise Call NameLoad Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr Call NameLoad Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr BinOpPow Num Num keyword ListLoad Str Str Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Raise Call NameLoad BinOpAdd Call NameLoad AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Call NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults kwarg body Expr Str Raise Call NameLoad BinOpAdd Call NameLoad AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Raise Call NameLoad BinOpAdd Call NameLoad AttributeLoad NameLoad attr Str decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call NameLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword Str Assign AttributeStore NameLoad attr Call NameLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword Str Assign AttributeStore NameLoad attr ListLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list Call NameLoad AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam defaults body Return Call AttributeLoad AttributeLoad NameLoad attr attr keyword TupleLoad NameLoad AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword AttributeLoad AttributeLoad NameLoad attr attr decorator_list Call NameLoad AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam defaults body Return BinOpMult Num Call AttributeLoad BinOpAdd Call AttributeLoad NameLoad attr BinOpMult BinOpMult Num NameLoad Call AttributeLoad NameLoad attr BinOpMult Num AttributeLoad NameLoad attr BinOpPow BinOpDiv BinOpSub NameLoad AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num attr keyword Num decorator_list Call NameLoad AttributeLoad NameLoad attr decorator_list
N/A N/A 
Classes implementing logic related to the prior distribution
:math:`p_\theta(\mathbf{z})` in the VAE framework
 N/A __authors__ Vincent Dumoulin N/A __copyright__ Copyright 2014, Universite de Montreal N/A __credits__ N/A Vincent Dumoulin N/A __license__ 3-clause BSD N/A __maintainer__ Vincent Dumoulin N/A __email__ pylearn-dev@googlegroups N/A numpy N/A theano N/A theano.tensor T pylearn2.compat OrderedDict pylearn2.models Model pylearn2.utils.rng make_theano_rng pylearn2.utils sharedX wraps N/A pi N/A sharedX N/A numpy pi Prior N/A Model N/A N/A 
    Abstract class implementing methods related to the prior distribution
    :math:`p_\theta(\mathbf{z})` for the VAE framework

    Parameters
    ----------
    See `Model`
     get_vae N/A N/A self N/A N/A N/A 
        Returns the VAE that this `Prior` instance belongs to, or None
        if it has not been assigned to a VAE yet.
         N/A N/A hasattr self vae N/A N/A N/A self vae N/A N/A None N/A set_vae N/A N/A self vae N/A N/A N/A 
        Assigns this `Prior` instance to a VAE.

        Parameters
        ----------
        vae : pylearn2.models.vae.VAE
            VAE to assign to
         N/A N/A N/A N/A self get_vae None N/A N/A N/A RuntimeError this `Prior` instance already belongs to another VAE N/A N/A self vae vae N/A N/A self rng N/A N/A self vae rng N/A N/A self theano_rng N/A make_theano_rng N/A int N/A N/A N/A self rng randint N/A 2 30 which_method N/A normal uniform N/A N/A self batch_size N/A vae batch_size N/A initialize_parameters N/A N/A self nhid N/A N/A N/A 
        Initialize model parameters.

        Parameters
        ----------
        nhid : int
            Number of latent units for z
         N/A N/A NotImplementedError N/A N/A str N/A self __class__  does not implement initialize_parameters N/A monitoring_channels_from_prior_params N/A N/A self N/A N/A N/A 
        Get monitoring channels from the parameters of the prior distribution.

        By default, no monitoring channel is computed.
         N/A N/A OrderedDict N/A sample_from_p_z N/A N/A self num_samples N/A kwargs N/A N/A 
        Samples from the prior distribution :math:`p_\theta(\mathbf{z})`

        Parameters
        ----------
        num_samples : int
            Number of samples

        Returns
        -------
        z : tensor_like
            Sample from the prior distribution
         N/A N/A NotImplementedError N/A N/A str N/A self __class__  does not implement sample_from_p_z. N/A log_p_z N/A N/A self z N/A N/A N/A 
        Computes the log-prior probabilities of `z`

        Parameters
        ----------
        z : tensor_like
            Posterior samples

        Returns
        -------
        log_p_z : tensor_like
            Log-prior probabilities
         N/A N/A NotImplementedError N/A N/A str N/A self __class__  does not implement log_p_z. N/A N/A DiagonalGaussianPrior N/A Prior N/A N/A 
    Implements a gaussian prior diagonal covariance matrix, i.e.

    .. math::
        p_\theta(\mathbf{z})
        = \prod_i \exp(-(z_i - \mu_i)^2 / (2\sigma_i^2 ) /
                   (\sqrt{2 \pi} \sigma_i)

    Parameters
    ----------
    See `Model`
     initialize_parameters N/A N/A self nhid N/A N/A N/A N/A self nhid nhid N/A N/A self prior_mu N/A sharedX N/A N/A numpy zeros N/A self nhid name prior_mu N/A N/A self log_prior_sigma N/A sharedX N/A N/A numpy zeros N/A self nhid name prior_log_sigma N/A N/A self _params N/A N/A self prior_mu N/A self log_prior_sigma N/A N/A wraps N/A Prior initialize_parameters sample_from_p_z N/A N/A self num_samples N/A N/A N/A N/A N/A N/A self theano_rng normal size N/A num_samples N/A self nhid avg N/A self prior_mu std N/A N/A T exp N/A self log_prior_sigma dtype N/A N/A theano config floatX N/A N/A wraps N/A Prior sample_from_p_z log_p_z N/A N/A self z N/A N/A N/A N/A -0.5 N/A N/A N/A N/A N/A T log N/A N/A 2 pi N/A N/A T exp N/A 2 N/A self log_prior_sigma N/A N/A N/A z N/A self prior_mu N/A N/A T exp N/A self log_prior_sigma 2 sum axis 2 N/A N/A wraps N/A Prior log_p_z N/A