An Online Learning Approach to Generative Adversarial Networks