Updated training function.
Merge branch 'master' of github.com:dankoc/Rdbn
Minor changes.