Neural oscillators for generalization of physics-informed machine learning