import tensorflow as tf

        return z2, fldj
    
    def _inverse(self, x1, z2, **kwargs):
        params = self.parameterizer(x1)
        mus, log_sigmas = params[:,:,:,0::2], params[:,:,:,1::2]
        x2, ildj = gaussianize(z2, mus, log_sigmas, inverse=tf.constant(True))
        return x2, ildj
    
def log_gaussianize(x, mus, log_sigmas, inverse=tf.constant(False)):
    """
