Imported from https://github.com/matthewberger/tfgan