torch/cunn — pull request #3 by jucor (2014-02-27 11:36:44+00:00)
Title: Add unit test for Mean and Sum

Add unit test for Mean and Sum, which are now CUDA-compatible thanks to torch/nn#5 by @akfidjeland.
Note that the unit test on my machine says the GPU Mean is slower than CPU Mean, especially for `Mean.backward`:

```
Mean forward 402x28: average speedup is 0.11979166666667
Sum forward 865x4: average speedup is 0.62376237623762
Mean.backward 384x11: average speedup is 0.020155748969308
Sum.backward 952x20: average speedup is 1.8684210526316
```

Can someone try on another machine and see, please?

I'm not too worried, though: it could be that the test size is too small. Besides, even if there indeed is a slow-down, having a CUDA Mean/Sum is useful when part of a larger cuda'd module, to avoid host/device trnasfers.