A Deep Learning Approach to the Forecasting of Ground Magnetic Field Perturbations at High and Mid-Latitudes