Rewrote gradient descent to use Apply for scalar matrix multiplication.
Merge pull request #100 from pontusmelke/use-apply

Rewrote gradient descent to use Apply for scalar matrix multiplication.