Composition and decomposition of GANs