Training Compressors and Generators