Merge pull request #838 from cuicanyeah/cnn-main

Training script that controls the training flow of CNN