Fix the training & testing process.