{"id":29895563,"url":"https://github.com/raphaelsenn/pytorch-gans","last_synced_at":"2025-08-01T07:21:06.411Z","repository":{"id":306807282,"uuid":"1019705387","full_name":"raphaelsenn/pytorch-GANs","owner":"raphaelsenn","description":"PyTorch implementations of various GAN papers/architectures like GAN (Goodfellow at at.), DCGAN (Radford et al.), etc. ","archived":false,"fork":false,"pushed_at":"2025-07-27T17:38:32.000Z","size":148677,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-27T19:29:39.284Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/raphaelsenn.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,"zenodo":null}},"created_at":"2025-07-14T18:34:50.000Z","updated_at":"2025-07-27T17:38:37.000Z","dependencies_parsed_at":"2025-07-27T19:44:24.730Z","dependency_job_id":null,"html_url":"https://github.com/raphaelsenn/pytorch-GANs","commit_stats":null,"previous_names":["raphaelsenn/pytorch-gans"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/raphaelsenn/pytorch-GANs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raphaelsenn%2Fpytorch-GANs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raphaelsenn%2Fpytorch-GANs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raphaelsenn%2Fpytorch-GANs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raphaelsenn%2Fpytorch-GANs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/raphaelsenn","download_url":"https://codeload.github.com/raphaelsenn/pytorch-GANs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raphaelsenn%2Fpytorch-GANs/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268185548,"owners_count":24209387,"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","status":"online","status_checked_at":"2025-08-01T02:00:08.611Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2025-08-01T07:21:01.533Z","updated_at":"2025-08-01T07:21:06.401Z","avatar_url":"https://github.com/raphaelsenn.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pytorch-GANs\nPyTorch implementations of various GAN papers/architectures like GAN (Goodfellow at at.), DCGAN (Radford et al.), etc. \n\n## Implemented Papers\n\n* [Generative Adversarial Networks (Goodfellow et al., 2014)](https://arxiv.org/abs/1406.2661)\n\n* [Unsupervised Representation Learning with Deep Convolutional Generative Adversarial Networks (Radford et al., 2016)](https://arxiv.org/abs/1511.06434)\n\n* [Conditional Generative Adversarial Nets (Mirza et al., 2014)](https://arxiv.org/abs/1411.1784)\n\n## Generative Adversarial Networks (Goodfellow et al., 2014)\nThis code tries to reproduce the 2014 Goodfellow et al. paper [Generative Adversarial Networks](https://arxiv.org/abs/1406.2661).\n\nOriginal code and hyperparameters from the paper can be found [here](https://github.com/goodfeli/adversarial).\n\n### MNIST (fully connected model)\n\n#### Model Architecture:\n\nGenerator:\n* Input layer: 100 units (Uniform[-1, 1] noise)\n* Dense layer: 1200 units, ReLU\n* Dense layer: 1200 units, ReLU\n* Output layer: 784 units, Sigmoid\n\nDiscriminator:\n* Input layer: 784 units (flattend 28x28 gray-scale image)\n* Maxout layer: 240 units, 5 pieces\n* Maxout layer: 240 units, 5 pieces\n* Output layer: 1 unit, Sigmoid \n\n\u003cdiv style=\"text-align: center;\":\u003e\n      \u003cimg src=\"./res/mnist.gif\" width=\"400\"\u003e\n\u003c/div\u003e\n\n\n| Epoch 001 | Epoch 100 |Loss |\n| --------- | ---------- |-----------|\n| ![mnist](./res/vanilla_gan_mnist_000.png) | ![mnist](./res/vannila_gan_mnist_100.png)| ![loss](./res/vannila_gan_loss_mnist.png)|\n\n### CelebFaces (fully connected model)\n\n#### Model Architecture:\n\nGenerator:\n* Input layer:    100 units (Uniform[-1, 1] noise)\n* Dense layer:    8000 units, ReLU\n* Output layer:   2304 units, Sigmoid\n\nDiscriminator:\n* Input layer: 2304 units (flattend 48x48 grayscale image)\n* Maxout layer: 1200 units, 5 pieces\n* Maxout layer: 1200 units, 5 pieces\n* Output layer: 1 unit, Sigmoid \n\n\u003cdiv style=\"text-align: center;\":\u003e\n      \u003cimg src=\"./res/celebfaces_fc_gray.gif\" width=\"400\"\u003e\n\u003c/div\u003e\n\n| Epoch 001 | Epoch 250 |Loss |\n| --------- | ---------- |-----------|\n| ![celebfaces_fc_vanilla](./res/vannila_gan_celebfaces_000.png) | ![celebfaces_fc_vanilla](./res/vannila_gan_celebfaces_100.png)| ![celebfaces_fc_loss_vanilla](./res/vannila_gan_loss_celebfaces.png)|\n\n\n## Deep Convolutional Generative Adversarial Networks (Radford et al. 2016)\nThis code tries to reproduce the 2016 Radford et al. paper [Deep Convolutional Generative Adversarial Networks](https://arxiv.org/abs/1511.06434).\n\n![dcgan_generator](./res/DCGAN_generator.png)\n*Figure 1: The architecture of the DCGAN generator used for CelebFaces modeling; Taken from Radford et al., 2016.*\n\n#### CelebFaces (deep convolutional model)\n\n\u003cdiv style=\"text-align: center;\":\u003e\n      \u003cimg src=\"./res/dcgan_celebfaces.gif\" width=\"400\"\u003e\n\u003c/div\u003e\n\n| Epoch 01 | Epoch 50 | Loss |\n| --------- | ---------- | ------- | \n| ![celebfaces_dcgan](./res/dcgan_celebfaces_00.png) | ![celebfaces_dcgan](./res/dcgan_celebfaces_50.png) | ![dcgan_loss_celeb](./res/dcgan_loss_cifar.png)|\n\n##### About the CelebFaces dataset\nThe dataset was taken from kaggle.\nLink to the dataset can be found [here](https://www.kaggle.com/datasets/jessicali9530/celeba-dataset).\n\nReproducibility:\n\nDownload the [CelebA dataset](https://mmlab.ie.cuhk.edu.hk/projects/CelebA.html) and place the images and attribute CSV in a folder called `celeba`.  \n\n```python\ndataset = CelebA(csv_file=\"list_attr_celeba.csv\", root_dir=\"img_align_celeba\", transform=...)\n```\n\n\n## Conditional Generative Adversarial Nets\nThis code tries to reproduce the 2014 Mirza et al. paper [Conditional Generative Adversarial Nets](https://arxiv.org/abs/1411.1784).\n\n![cgan](./res/cgan_architecture.png)\n*Architecture of an conditional generative adversarial net; Taken from Mirza et al., 2014.*\n\n#### MNIST (fully connected model)\n\n\u003cdiv style=\"text-align: center;\":\u003e\n      \u003cimg src=\"./res/cgan_mnist.gif\" width=\"400\"\u003e\n\u003c/div\u003e\n\n| Epoch 001 | Epoch 100 | Loss |\n| --------- | ---------- | ------- | \n| ![cgan_mnist](./res/cgan_mnist_fc_001.png) | ![cgan](./res/cgan_mnist_fc_100.png) | ![cgan_loss_mnist](./res/cgan_mnist_fc_loss.png)|\n\n## Citations\n\n```bibtex\n@misc{goodfellow2014generativeadversarialnetworks,\n      title={Generative Adversarial Networks}, \n      author={Ian J. Goodfellow and Jean Pouget-Abadie and Mehdi Mirza and Bing Xu and David Warde-Farley and Sherjil Ozair and Aaron Courville and Yoshua Bengio},\n      year={2014},\n      eprint={1406.2661},\n      archivePrefix={arXiv},\n      primaryClass={stat.ML},\n      url={https://arxiv.org/abs/1406.2661}, \n}\n```\n\n```bibtex\n@misc{radford2016unsupervisedrepresentationlearningdeep,\n      title={Unsupervised Representation Learning with Deep Convolutional Generative Adversarial Networks}, \n      author={Alec Radford and Luke Metz and Soumith Chintala},\n      year={2016},\n      eprint={1511.06434},\n      archivePrefix={arXiv},\n      primaryClass={cs.LG},\n      url={https://arxiv.org/abs/1511.06434}, \n}\n```\n\n```bibtex\n@misc{mirza2014conditionalgenerativeadversarialnets,\n      title={Conditional Generative Adversarial Nets}, \n      author={Mehdi Mirza and Simon Osindero},\n      year={2014},\n      eprint={1411.1784},\n      archivePrefix={arXiv},\n      primaryClass={cs.LG},\n      url={https://arxiv.org/abs/1411.1784}, \n}\n```\n\n```bibtex\n@misc{liu2015celeba,\n  title        = {CelebA: Large-scale CelebFaces Attributes Dataset},\n  author       = {Z. Liu and P. Luo and X. Wang and X. Tang},\n  year         = {2015},\n  howpublished = {\\url{https://www.kaggle.com/datasets/jessicali9530/celeba-dataset}},\n  note         = {Original dataset by MMLAB, The Chinese University of Hong Kong},\n  institution  = {Kaggle},\n  keywords     = {face recognition, facial attributes, dataset}\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraphaelsenn%2Fpytorch-gans","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fraphaelsenn%2Fpytorch-gans","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraphaelsenn%2Fpytorch-gans/lists"}