Modify Training Directions in Function Space to Reduce Generalization Error