{"id":13698866,"url":"https://github.com/tensorflow/gan","last_synced_at":"2025-05-14T00:10:20.644Z","repository":{"id":39351684,"uuid":"184105548","full_name":"tensorflow/gan","owner":"tensorflow","description":"Tooling for GANs in TensorFlow","archived":false,"fork":false,"pushed_at":"2025-01-16T14:29:47.000Z","size":54342,"stargazers_count":947,"open_issues_count":18,"forks_count":248,"subscribers_count":43,"default_branch":"master","last_synced_at":"2025-04-03T06:39:39.701Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tensorflow.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-04-29T16:24:10.000Z","updated_at":"2025-03-16T12:29:54.000Z","dependencies_parsed_at":"2025-02-27T02:17:09.672Z","dependency_job_id":null,"html_url":"https://github.com/tensorflow/gan","commit_stats":{"total_commits":385,"total_committers":19,"mean_commits":"20.263157894736842","dds":0.4077922077922078,"last_synced_commit":"be35c9ae078e9f5d595a1f00d11bdd56a8e59a16"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tensorflow%2Fgan","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tensorflow%2Fgan/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tensorflow%2Fgan/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tensorflow%2Fgan/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tensorflow","download_url":"https://codeload.github.com/tensorflow/gan/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248208679,"owners_count":21065203,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-02T19:00:54.007Z","updated_at":"2025-04-10T11:29:55.262Z","avatar_url":"https://github.com/tensorflow.png","language":"Jupyter Notebook","readme":"# TensorFlow-GAN (TF-GAN)\n\nTF-GAN is a lightweight library for training and evaluating\n[Generative Adversarial Networks (GANs)](https://arxiv.org/abs/1406.2661).\n\n\n*   Can be installed with `pip` using `pip install tensorflow-gan`, and used\n    with `import tensorflow_gan as tfgan`\n*   [Well-tested examples](https://github.com/tensorflow/gan/tree/master/tensorflow_gan/examples/)\n*   [Interactive introduction to TF-GAN](https://github.com/tensorflow/gan/blob/master/tensorflow_gan/examples/colab_notebooks/tfgan_tutorial.ipynb) in\n\n## Structure of the TF-GAN Library\n\nTF-GAN is composed of several parts, which are designed to exist independently:\n\n*   [Core](https://github.com/tensorflow/gan/tree/master/tensorflow_gan/python/train.py):\n    the main infrastructure needed to train a GAN. Set up training with any\n    combination of TF-GAN library calls, custom-code, native TF code, and other\n    frameworks\n*   [Features](https://github.com/tensorflow/gan/tree/master/tensorflow_gan/python/features/):\n    common GAN operations and normalization techniques, such as instance\n    normalization and conditioning.\n*   [Losses](https://github.com/tensorflow/gan/tree/master/tensorflow_gan/python/losses/):\n    losses and penalties, such as the Wasserstein loss, gradient penalty, mutual\n    information penalty, etc.\n*   [Evaluation](https://github.com/tensorflow/gan/tree/master/tensorflow_gan/python/eval/):\n    standard GAN evaluation metrics. Use `Inception Score`, `Frechet Distance`,\n    or `Kernel Distance` with a pretrained Inception network to evaluate your\n    unconditional generative model. You can also use your own pretrained\n    classifier for more specific performance numbers, or use other methods for\n    evaluating conditional generative models.\n*   [Examples](https://github.com/tensorflow/gan/tree/master/tensorflow_gan/):\n    simple examples on how to use TF-GAN, and more complicated state-of-the-art\n    examples\n\n## Who uses TF-GAN?\n\nNumerous projects inside Google. The following are some published papers that\nuse TF-GAN:\n\n*   [Self-Attention Generative Adversarial Networks](https://arxiv.org/abs/1805.08318)\n*   [Large Scale GAN Training for High Fidelity Natural Image Synthesis](https://arxiv.org/abs/1809.11096)\n*   [GANSynth: Adversarial Neural Audio Synthesis](https://arxiv.org/abs/1902.08710)\n*   [Boundless: Generative Adversarial Networks for Image Extension](http://arxiv.org/abs/1908.07007)\n*   [NetGAN: Generating Graphs via Random Walks](https://arxiv.org/abs/1803.00816)\n*   [Discriminator rejection sampling](https://arxiv.org/abs/1810.06758)\n*   [Generative Models for Effective ML on Private, Decentralized Datasets](https://arxiv.org/pdf/1911.06679.pdf)\n*   [Semantic Pyramid for Image Generation](https://arxiv.org/abs/2003.06221)\n*   [GAN-Mediated Cell Images Batch Equalization](https://www.biorxiv.org/content/10.1101/2020.02.07.939215v1.full)\n\nThe framework [Compare GAN](https://github.com/google/compare_gan) uses TF-GAN,\nespecially the evaluation metrics.\n[Their papers](https://github.com/google/compare_gan#compare-gan) use TF-GAN to\nensure consistent and comparable evaluation metrics. Some of those papers are:\n\n*   [Are GANs Created Equal? A Large-Scale Study](https://arxiv.org/abs/1711.10337)\n*   [The GAN Landscape: Losses, Architectures, Regularization, and Normalization](https://arxiv.org/abs/1807.04720)\n*   [Assessing Generative Models via Precision and Recall](https://arxiv.org/abs/1806.00035)\n*   [High-Fidelity Image Generation With Fewer Labels](https://arxiv.org/abs/1903.02271)\n\n## Training a GAN model\n\nTraining in TF-GAN typically consists of the following steps:\n\n1.  Specify the input to your networks.\n1.  Set up your generator and discriminator using a `GANModel`.\n1.  Specify your loss using a `GANLoss`.\n1.  Create your train ops using a `GANTrainOps`.\n1.  Run your train ops.\n\nAt each stage, you can either use TF-GAN's convenience functions, or you can\nperform the step manually for fine-grained control.\n\nThere are various types of GAN setup. For instance, you can train a generator to\nsample unconditionally from a learned distribution, or you can condition on\nextra information such as a class label. TF-GAN is compatible with many setups,\nand we demonstrate in the well-tested\n[examples directory](https://github.com/tensorflow/gan/tree/master/tensorflow_gan/examples/)\n\n\n## Maintainers\n\n*   (Documentation) David Westbrook, westbrook@google.com\n*   Joel Shor, joelshor@google.com, [github](https://github.com/joel-shor)\n*   Aaron Sarna, sarna@google.com, [github](https://github.com/aaronsarna)\n*   Yoel Drori, dyoel@google.com, [github](https://github.com/yoeldr)\n\n## Authors\n\n*   Joel Shor, joelshor@google.com, [github](https://github.com/joel-shor)\n","funding_links":[],"categories":["Python","Other 💛💛💛💛💛\u003ca name=\"Other\" /\u003e"],"sub_categories":["General-Purpose Machine Learning","TF-GAN是用于培训和评估生成对抗网络GAN的轻量级库"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftensorflow%2Fgan","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftensorflow%2Fgan","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftensorflow%2Fgan/lists"}