Curvature Learning for Generalization of Hyperbolic Neural Networks