def log_mean_exp(a):
    max_ = a.max(1)
    return max_ + T.log(T.exp(a - max_.dimshuffle(0, 'x')).mean(1))
.. todo::
dataset/ETHPy150Open lisa-lab/pylearn2/pylearn2/distributions/parzen.py/log_mean_exp