{"id":20923399,"url":"https://github.com/amir-tav/gann-with-tensorflow","last_synced_at":"2026-04-15T13:33:12.070Z","repository":{"id":263447605,"uuid":"871155527","full_name":"Amir-Tav/GANN-with-TensorFlow","owner":"Amir-Tav","description":"How to build, train, and evaluate a Generative Adversarial Network (GAN) for generating fashion images. The project covers all essential steps, from model building to training and evaluation.","archived":false,"fork":false,"pushed_at":"2024-11-18T15:10:27.000Z","size":7362,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-13T00:42:48.775Z","etag":null,"topics":["gann","ju","kera","neural-network","py","sequential-models","tensorflow","tfd"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","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/Amir-Tav.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":"2024-10-11T11:35:33.000Z","updated_at":"2024-11-18T15:10:42.000Z","dependencies_parsed_at":"2024-11-18T16:54:04.775Z","dependency_job_id":"6668a9cb-bc24-464f-8dae-33ca05a7a615","html_url":"https://github.com/Amir-Tav/GANN-with-TensorFlow","commit_stats":null,"previous_names":["amir-tav/gann-with-tensorflow"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Amir-Tav%2FGANN-with-TensorFlow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Amir-Tav%2FGANN-with-TensorFlow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Amir-Tav%2FGANN-with-TensorFlow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Amir-Tav%2FGANN-with-TensorFlow/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Amir-Tav","download_url":"https://codeload.github.com/Amir-Tav/GANN-with-TensorFlow/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243318747,"owners_count":20272137,"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":["gann","ju","kera","neural-network","py","sequential-models","tensorflow","tfd"],"created_at":"2024-11-18T20:15:28.549Z","updated_at":"2026-04-15T13:33:12.025Z","avatar_url":"https://github.com/Amir-Tav.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FashionGAN: Generative Adversarial Network for Fashion Images\n\nThis repository demonstrates how to build, train, and evaluate a Generative Adversarial Network (GAN) for generating fashion images. The project covers all essential steps, from model building to training and evaluation.\n\n---\n\n## 1. Setting Up the Environment\n\nInstall the required libraries and dependencies:\n\n```bash\npip install tensorflow matplotlib\n```\n\n---\n\n## 2. Building the Generator and Discriminator\n\nThe generator creates new images from random noise, while the discriminator evaluates the authenticity of generated images. Key parts of the generator and discriminator are outlined below:\n\n- **Generator Model:**\n  - A sequential model with dense and convolutional layers.\n\n- **Discriminator Model:**\n  - Convolutional layers with Leaky ReLU activations and dropout for regularization.\n\n```python\ndef build_generator():\n    model = Sequential()\n    # Add layers to the model\n    return model\n\ndef build_discriminator():\n    model = Sequential()\n    # Add layers to the model\n    return model\n```\n\n---\n\n## 3. Training the GAN\n\nThe GAN is trained using a custom training loop, where both the generator and discriminator are updated iteratively:\n\n```python\nfor epoch in range(epochs):\n    # Train discriminator and generator\n```\n\n---\n\n## 4. Monitoring and Saving the Model\n\nUtilize callbacks to monitor training progress and save generated images:\n\n```python\nclass ModelMonitor(Callback):\n    def on_epoch_end(self, epoch, logs=None):\n        # Save generated images\n```\n\n---\n\n## 5. Testing the Generator\n\nAfter training, the generator can produce new images based on learned features:\n\n```python\ngenerator.load_weights('path_to_weights')\ngenerated_images = generator.predict(tf.random.normal((16, 128, 1)))\n```\n\n---\n\n## Conclusion\n\nThis project successfully demonstrates how to:\n* Build a GAN with TensorFlow and Keras.\n* Train the model and visualize generated images.\n* Evaluate the performance of the generator and discriminator.\n*also note: the model is only trained with 5 epoch, but the outcome is still impresive!\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famir-tav%2Fgann-with-tensorflow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famir-tav%2Fgann-with-tensorflow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famir-tav%2Fgann-with-tensorflow/lists"}