A neural network approach for the reduction of the dimensionality of slowly time-varying electromagnetic inverse problems