fixed a bug with sim never ending, added support for training mode for dropout visualization