move analytic gradient computation outside loop and store -- saves a lot
of time
eltwise gradient checker
Merge pull request #363 from jeffdonahue/speedup-gradient-check

Gradient check speedups