Return correct matrix.
Remove redundancies.

Introduce bug.
Fix resize.
Move order of statements.
Simplify forward propagation.
Initialize RBM gradient with correct sign.
Remove check.
Merge pull request #144 from AlexanderFabisch/refactor_sae

Refactor sae