A Generative Model of Symmetry Transformations