def _build_prior(self, unconstrained_tensor, constrained_tensor):
        """
        Build a tensorflow representation of the prior density.
        The log Jacobian is included.
        """
        if not misc.is_tensor(unconstrained_tensor):
            raise GPflowError("Unconstrained input must be a tensor.")

        if not misc.is_tensor(constrained_tensor):
            raise GPflowError("Constrained input must be a tensor.")

        prior_name = 'prior'

        if self.prior is None:
            return tf.constant(0.0, settings.float_type, name=prior_name)

        log_jacobian = self.transform.log_jacobian_tensor(unconstrained_tensor)
        logp_var = self.prior.logp(constrained_tensor)
        return tf.squeeze(tf.add(logp_var, log_jacobian, name=prior_name))
def _build_prior ( self , unconstrained_tensor , constrained_tensor ) : if not misc . is_tensor ( unconstrained_tensor ) : raise GPflowError ( "Unconstrained input must be a tensor." ) if not misc . is_tensor ( constrained_tensor ) : raise GPflowError ( "Constrained input must be a tensor." ) prior_name = 'prior' if self . prior is None : return tf . constant ( 0.0 , settings . float_type , name = prior_name ) log_jacobian = self . transform . log_jacobian_tensor ( unconstrained_tensor ) logp_var = self . prior . logp ( constrained_tensor ) return tf . squeeze ( tf . add ( logp_var , log_jacobian , name = prior_name ) )
Build a tensorflow representation of the prior density.
        The log Jacobian is included.