def theano_parzen(mu, sigma):

    x = T.matrix()
    mu = theano.shared(mu)
    a = ( x.dimshuffle(0, 'x', 1) - mu.dimshuffle('x', 0, 1) ) / sigma
    E = log_mean_exp(-0.5*(a**2).sum(2))
    Z = mu.shape[1] * T.log(sigma * numpy.sqrt(numpy.pi * 2))

    return theano.function([x], E - Z)
Create a custom update function for a volume.
dataset/ETHPy150Open goodfeli/adversarial/parzen_ll.py/theano_parzen--crossover with--dataset/ETHPy150Open ClusterHQ/flocker/flocker/node/agents/functional/test_ebs.py/VolumeStateTransitionTests._custom_update