Imported from https://github.com/phquang/OnlineDeepLearning