Update trainer after moving cost derivatives into MLPBaseTrainer