Accelerating the electronic-structure calculation of magnetic systems by equivariant neural networks