Application of artificial neural networks for modeling of electronic excitation dynamics in 2D lattice: Direct and inverse problems