Added offline training.