Generalization Properties of Machine Learning-based Raman Models