Solved bug in SDAE training