torch/nn — pull request #45 by jonathantompson (2014-07-21 23:14:13+00:00)
Title: Kl divergence

Added a C implementation of KL divergence. Note that the behaviour when sizeAverage = true has changed slightly... Actually, I think the BPROP was wrong when input:dim() > 1 and sizeAverage == true. This is now fixed and it's behaviour is more in line with the MSECriterion.

In addition to be much faster, the input size is now arbitrary (works for any dimension input).

I will upload a CUDA version to cunn as well.