fixing train-autoencoder demo

Fixes issue
https://github.com/clementfarabet/torch7-demos/issues/4