Parameter Estimation via Deep Learning for Camera Localization