Imitation Learning For Swarm Control Using Variational Inference