In this paper, a neural network predictive controller is proposed to regulate the active and the reactive power delivered to the grid generated by a three-phase virtual inertia-based inverter. The concept of the conventional virtual synchronous generator (VSG) is discussed, and it is shown that when the inverter is connected to non-inductive grids, the conventional PI-based VSGs are unable to perform acceptable tracking. The concept of the neural network predictive controller is also discussed to replace the traditional VSGs. This replacement enables inverters to perform in both inductive and non-inductive grids. The simulation results confirm that a well-trained neural network predictive controller illustrates can adapt to any grid impedance angle, compared to the traditional PI-based virtual inertia controllers.