[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-hwalsuklee--tensorflow-generative-model-collections":3,"tool-hwalsuklee--tensorflow-generative-model-collections":61},[4,18,26,36,44,53],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":17},4358,"openclaw","openclaw\u002Fopenclaw","OpenClaw 是一款专为个人打造的本地化 AI 助手，旨在让你在自己的设备上拥有完全可控的智能伙伴。它打破了传统 AI 助手局限于特定网页或应用的束缚，能够直接接入你日常使用的各类通讯渠道，包括微信、WhatsApp、Telegram、Discord、iMessage 等数十种平台。无论你在哪个聊天软件中发送消息，OpenClaw 都能即时响应，甚至支持在 macOS、iOS 和 Android 设备上进行语音交互，并提供实时的画布渲染功能供你操控。\n\n这款工具主要解决了用户对数据隐私、响应速度以及“始终在线”体验的需求。通过将 AI 部署在本地，用户无需依赖云端服务即可享受快速、私密的智能辅助，真正实现了“你的数据，你做主”。其独特的技术亮点在于强大的网关架构，将控制平面与核心助手分离，确保跨平台通信的流畅性与扩展性。\n\nOpenClaw 非常适合希望构建个性化工作流的技术爱好者、开发者，以及注重隐私保护且不愿被单一生态绑定的普通用户。只要具备基础的终端操作能力（支持 macOS、Linux 及 Windows WSL2），即可通过简单的命令行引导完成部署。如果你渴望拥有一个懂你",349277,3,"2026-04-06T06:32:30",[13,14,15,16],"Agent","开发框架","图像","数据工具","ready",{"id":19,"name":20,"github_repo":21,"description_zh":22,"stars":23,"difficulty_score":10,"last_commit_at":24,"category_tags":25,"status":17},3808,"stable-diffusion-webui","AUTOMATIC1111\u002Fstable-diffusion-webui","stable-diffusion-webui 是一个基于 Gradio 构建的网页版操作界面，旨在让用户能够轻松地在本地运行和使用强大的 Stable Diffusion 图像生成模型。它解决了原始模型依赖命令行、操作门槛高且功能分散的痛点，将复杂的 AI 绘图流程整合进一个直观易用的图形化平台。\n\n无论是希望快速上手的普通创作者、需要精细控制画面细节的设计师，还是想要深入探索模型潜力的开发者与研究人员，都能从中获益。其核心亮点在于极高的功能丰富度：不仅支持文生图、图生图、局部重绘（Inpainting）和外绘（Outpainting）等基础模式，还独创了注意力机制调整、提示词矩阵、负向提示词以及“高清修复”等高级功能。此外，它内置了 GFPGAN 和 CodeFormer 等人脸修复工具，支持多种神经网络放大算法，并允许用户通过插件系统无限扩展能力。即使是显存有限的设备，stable-diffusion-webui 也提供了相应的优化选项，让高质量的 AI 艺术创作变得触手可及。",162132,"2026-04-05T11:01:52",[14,15,13],{"id":27,"name":28,"github_repo":29,"description_zh":30,"stars":31,"difficulty_score":32,"last_commit_at":33,"category_tags":34,"status":17},1381,"everything-claude-code","affaan-m\u002Feverything-claude-code","everything-claude-code 是一套专为 AI 编程助手（如 Claude Code、Codex、Cursor 等）打造的高性能优化系统。它不仅仅是一组配置文件，而是一个经过长期实战打磨的完整框架，旨在解决 AI 代理在实际开发中面临的效率低下、记忆丢失、安全隐患及缺乏持续学习能力等核心痛点。\n\n通过引入技能模块化、直觉增强、记忆持久化机制以及内置的安全扫描功能，everything-claude-code 能显著提升 AI 在复杂任务中的表现，帮助开发者构建更稳定、更智能的生产级 AI 代理。其独特的“研究优先”开发理念和针对 Token 消耗的优化策略，使得模型响应更快、成本更低，同时有效防御潜在的攻击向量。\n\n这套工具特别适合软件开发者、AI 研究人员以及希望深度定制 AI 工作流的技术团队使用。无论您是在构建大型代码库，还是需要 AI 协助进行安全审计与自动化测试，everything-claude-code 都能提供强大的底层支持。作为一个曾荣获 Anthropic 黑客大奖的开源项目，它融合了多语言支持与丰富的实战钩子（hooks），让 AI 真正成长为懂上",160015,2,"2026-04-18T11:30:52",[14,13,35],"语言模型",{"id":37,"name":38,"github_repo":39,"description_zh":40,"stars":41,"difficulty_score":32,"last_commit_at":42,"category_tags":43,"status":17},2271,"ComfyUI","Comfy-Org\u002FComfyUI","ComfyUI 是一款功能强大且高度模块化的视觉 AI 引擎，专为设计和执行复杂的 Stable Diffusion 图像生成流程而打造。它摒弃了传统的代码编写模式，采用直观的节点式流程图界面，让用户通过连接不同的功能模块即可构建个性化的生成管线。\n\n这一设计巧妙解决了高级 AI 绘图工作流配置复杂、灵活性不足的痛点。用户无需具备编程背景，也能自由组合模型、调整参数并实时预览效果，轻松实现从基础文生图到多步骤高清修复等各类复杂任务。ComfyUI 拥有极佳的兼容性，不仅支持 Windows、macOS 和 Linux 全平台，还广泛适配 NVIDIA、AMD、Intel 及苹果 Silicon 等多种硬件架构，并率先支持 SDXL、Flux、SD3 等前沿模型。\n\n无论是希望深入探索算法潜力的研究人员和开发者，还是追求极致创作自由度的设计师与资深 AI 绘画爱好者，ComfyUI 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",109154,"2026-04-18T11:18:24",[14,15,13],{"id":45,"name":46,"github_repo":47,"description_zh":48,"stars":49,"difficulty_score":32,"last_commit_at":50,"category_tags":51,"status":17},6121,"gemini-cli","google-gemini\u002Fgemini-cli","gemini-cli 是一款由谷歌推出的开源 AI 命令行工具，它将强大的 Gemini 大模型能力直接集成到用户的终端环境中。对于习惯在命令行工作的开发者而言，它提供了一条从输入提示词到获取模型响应的最短路径，无需切换窗口即可享受智能辅助。\n\n这款工具主要解决了开发过程中频繁上下文切换的痛点，让用户能在熟悉的终端界面内直接完成代码理解、生成、调试以及自动化运维任务。无论是查询大型代码库、根据草图生成应用，还是执行复杂的 Git 操作，gemini-cli 都能通过自然语言指令高效处理。\n\n它特别适合广大软件工程师、DevOps 人员及技术研究人员使用。其核心亮点包括支持高达 100 万 token 的超长上下文窗口，具备出色的逻辑推理能力；内置 Google 搜索、文件操作及 Shell 命令执行等实用工具；更独特的是，它支持 MCP（模型上下文协议），允许用户灵活扩展自定义集成，连接如图像生成等外部能力。此外，个人谷歌账号即可享受免费的额度支持，且项目基于 Apache 2.0 协议完全开源，是提升终端工作效率的理想助手。",100752,"2026-04-10T01:20:03",[52,13,15,14],"插件",{"id":54,"name":55,"github_repo":56,"description_zh":57,"stars":58,"difficulty_score":32,"last_commit_at":59,"category_tags":60,"status":17},4721,"markitdown","microsoft\u002Fmarkitdown","MarkItDown 是一款由微软 AutoGen 团队打造的轻量级 Python 工具，专为将各类文件高效转换为 Markdown 格式而设计。它支持 PDF、Word、Excel、PPT、图片（含 OCR）、音频（含语音转录）、HTML 乃至 YouTube 链接等多种格式的解析，能够精准提取文档中的标题、列表、表格和链接等关键结构信息。\n\n在人工智能应用日益普及的今天，大语言模型（LLM）虽擅长处理文本，却难以直接读取复杂的二进制办公文档。MarkItDown 恰好解决了这一痛点，它将非结构化或半结构化的文件转化为模型“原生理解”且 Token 效率极高的 Markdown 格式，成为连接本地文件与 AI 分析 pipeline 的理想桥梁。此外，它还提供了 MCP（模型上下文协议）服务器，可无缝集成到 Claude Desktop 等 LLM 应用中。\n\n这款工具特别适合开发者、数据科学家及 AI 研究人员使用，尤其是那些需要构建文档检索增强生成（RAG）系统、进行批量文本分析或希望让 AI 助手直接“阅读”本地文件的用户。虽然生成的内容也具备一定可读性，但其核心优势在于为机器",93400,"2026-04-06T19:52:38",[52,14],{"id":62,"github_repo":63,"name":64,"description_en":65,"description_zh":66,"ai_summary_zh":66,"readme_en":67,"readme_zh":68,"quickstart_zh":69,"use_case_zh":70,"hero_image_url":71,"owner_login":72,"owner_name":73,"owner_avatar_url":74,"owner_bio":73,"owner_company":75,"owner_location":73,"owner_email":76,"owner_twitter":73,"owner_website":73,"owner_url":77,"languages":78,"stars":83,"forks":84,"last_commit_at":85,"license":86,"difficulty_score":10,"env_os":87,"env_gpu":88,"env_ram":87,"env_deps":89,"category_tags":95,"github_topics":96,"view_count":32,"oss_zip_url":73,"oss_zip_packed_at":73,"status":17,"created_at":116,"updated_at":117,"faqs":118,"releases":149},9319,"hwalsuklee\u002Ftensorflow-generative-model-collections","tensorflow-generative-model-collections","Collection of generative models in Tensorflow","tensorflow-generative-model-collections 是一个基于 TensorFlow 框架的开源项目，汇集了多种主流生成对抗网络（GAN）和变分自编码器（VAE）的代码实现。它旨在解决研究人员和开发者在复现经典生成模型时面临的代码分散、标准不一及对比困难等痛点，提供了一套统一架构下的高质量参考代码。\n\n该项目非常适合 AI 研究人员、深度学习工程师以及希望深入理解生成式算法原理的学习者使用。其核心亮点在于实现了包括原始 GAN、LSGAN、WGAN 系列、DRAGAN、InfoGAN 等在内的十余种知名变体，并严格控制了网络架构的一致性（除特定结构需求外），确保不同模型间的核心思想能在公平环境下进行对比。此外，项目还附带了在 MNIST 数据集上的详细训练结果与可视化展示，支持用户通过简单命令快速复现实验。无论是用于学术研究的基准测试，还是作为入门生成式 AI 的教学素材，tensorflow-generative-model-collections 都是一个实用且专业的资源库。","# tensorflow-generative-model-collections\nTensorflow implementation of various GANs and VAEs.\n\n## Related Repositories\n### Pytorch version\nPytorch version of this repository is availabel at https:\u002F\u002Fgithub.com\u002Fznxlwm\u002Fpytorch-generative-model-collections\n\n### \"Are GANs Created Equal? A Large-Scale Study\" Paper \nhttps:\u002F\u002Fgithub.com\u002Fgoogle\u002Fcompare_gan is the code that was used in [the paper](https:\u002F\u002Farxiv.org\u002Fabs\u002F1711.10337).  \nIt provides IS\u002FFID and rich experimental results for all gan-variants.  \n\n## Generative Adversarial Networks (GANs)\n### Lists  \n\n*Name* | *Paper Link* | *Value Function*\n:---: | :---: | :--- |\n**GAN** | [Arxiv](https:\u002F\u002Farxiv.org\u002Fabs\u002F1406.2661) | \u003Cimg src = 'assets\u002Fequations\u002FGAN.png' height = '70px'>\n**LSGAN**| [Arxiv](https:\u002F\u002Farxiv.org\u002Fabs\u002F1611.04076) | \u003Cimg src = 'assets\u002Fequations\u002FLSGAN.png' height = '70px'>\n**WGAN**| [Arxiv](https:\u002F\u002Farxiv.org\u002Fabs\u002F1701.07875) | \u003Cimg src = 'assets\u002Fequations\u002FWGAN.png' height = '105px'>\n**WGAN_GP**| [Arxiv](https:\u002F\u002Farxiv.org\u002Fabs\u002F1704.00028) | \u003Cimg src = 'assets\u002Fequations\u002FWGAN_GP.png' height = '70px'>\n**DRAGAN**| [Arxiv](https:\u002F\u002Farxiv.org\u002Fabs\u002F1705.07215) | \u003Cimg src = 'assets\u002Fequations\u002FDRAGAN.png' height = '70px'>\n**CGAN**| [Arxiv](https:\u002F\u002Farxiv.org\u002Fabs\u002F1411.1784) | \u003Cimg src = 'assets\u002Fequations\u002FCGAN.png' height = '70px'>\n**infoGAN**| [Arxiv](https:\u002F\u002Farxiv.org\u002Fabs\u002F1606.03657) | \u003Cimg src = 'assets\u002Fequations\u002FinfoGAN.png' height = '70px'>\n**ACGAN**| [Arxiv](https:\u002F\u002Farxiv.org\u002Fabs\u002F1610.09585) | \u003Cimg src = 'assets\u002Fequations\u002FACGAN.png' height = '70px'>\n**EBGAN**| [Arxiv](https:\u002F\u002Farxiv.org\u002Fabs\u002F1609.03126) | \u003Cimg src = 'assets\u002Fequations\u002FEBGAN.png' height = '70px'>\n**BEGAN**| [Arxiv](https:\u002F\u002Farxiv.org\u002Fabs\u002F1702.08431) | \u003Cimg src = 'assets\u002Fequations\u002FBEGAN.png' height = '105px'>  \n\n#### Variants of GAN structure\n\u003Cimg src = 'assets\u002Fetc\u002FGAN_structure.png' height = '600px'>\n\n### Results for mnist\nNetwork architecture of generator and discriminator is the exaclty sames as in [infoGAN paper](https:\u002F\u002Farxiv.org\u002Fabs\u002F1606.03657).  \nFor fair comparison of core ideas in all gan variants, all implementations for network architecture are kept same except EBGAN and BEGAN. Small modification is made for EBGAN\u002FBEGAN, since those adopt auto-encoder strucutre for discriminator. But I tried to keep the capacity of discirminator.\n\nThe following results can be reproduced with command:  \n```\npython main.py --dataset mnist --gan_type \u003CTYPE> --epoch 25 --batch_size 64\n```\n\n#### Random generation\nAll results are randomly sampled.\n\n*Name* | *Epoch 2* | *Epoch 10* | *Epoch 25*\n:---: | :---: | :---: | :---: |\nGAN | \u003Cimg src = 'assets\u002Fmnist_results\u002Frandom_generation\u002FGAN_epoch001_test_all_classes.png' height = '230px'> | \u003Cimg src = 'assets\u002Fmnist_results\u002Frandom_generation\u002FGAN_epoch009_test_all_classes.png' height = '230px'> | \u003Cimg src = 'assets\u002Fmnist_results\u002Frandom_generation\u002FGAN_epoch024_test_all_classes.png' height = '230px'>\nLSGAN | \u003Cimg src = 'assets\u002Fmnist_results\u002Frandom_generation\u002FLSGAN_epoch001_test_all_classes.png' height = '230px'> | \u003Cimg src = 'assets\u002Fmnist_results\u002Frandom_generation\u002FLSGAN_epoch009_test_all_classes.png' height = '230px'> | \u003Cimg src = 'assets\u002Fmnist_results\u002Frandom_generation\u002FLSGAN_epoch024_test_all_classes.png' height = '230px'>\nWGAN | \u003Cimg src = 'assets\u002Fmnist_results\u002Frandom_generation\u002FWGAN_epoch001_test_all_classes.png' height = '230px'> | \u003Cimg src = 'assets\u002Fmnist_results\u002Frandom_generation\u002FWGAN_epoch009_test_all_classes.png' height = '230px'> | \u003Cimg src = 'assets\u002Fmnist_results\u002Frandom_generation\u002FWGAN_epoch024_test_all_classes.png' height = '230px'>\nWGAN_GP | \u003Cimg src = 'assets\u002Fmnist_results\u002Frandom_generation\u002FWGAN_GP_epoch001_test_all_classes.png' height = '230px'> | \u003Cimg src = 'assets\u002Fmnist_results\u002Frandom_generation\u002FWGAN_GP_epoch009_test_all_classes.png' height = '230px'> | \u003Cimg src = 'assets\u002Fmnist_results\u002Frandom_generation\u002FWGAN_GP_epoch024_test_all_classes.png' height = '230px'>\nDRAGAN | \u003Cimg src = 'assets\u002Fmnist_results\u002Frandom_generation\u002FDRAGAN_epoch001_test_all_classes.png' height = '230px'> | \u003Cimg src = 'assets\u002Fmnist_results\u002Frandom_generation\u002FDRAGAN_epoch009_test_all_classes.png' height = '230px'> | \u003Cimg src = 'assets\u002Fmnist_results\u002Frandom_generation\u002FDRAGAN_epoch024_test_all_classes.png' height = '230px'>\nEBGAN | \u003Cimg src = 'assets\u002Fmnist_results\u002Frandom_generation\u002FEBGAN_epoch001_test_all_classes.png' height = '230px'> | \u003Cimg src = 'assets\u002Fmnist_results\u002Frandom_generation\u002FEBGAN_epoch009_test_all_classes.png' height = '230px'> | \u003Cimg src = 'assets\u002Fmnist_results\u002Frandom_generation\u002FEBGAN_epoch024_test_all_classes.png' height = '230px'>\nBEGAN | \u003Cimg src = 'assets\u002Fmnist_results\u002Frandom_generation\u002FBEGAN_epoch001_test_all_classes.png' height = '230px'> | \u003Cimg src = 'assets\u002Fmnist_results\u002Frandom_generation\u002FBEGAN_epoch009_test_all_classes.png' height = '230px'> | \u003Cimg src = 'assets\u002Fmnist_results\u002Frandom_generation\u002FBEGAN_epoch024_test_all_classes.png' height = '230px'>\n\n#### Conditional generation\nEach row has the same noise vector and each column has the same label condition.\n\n*Name* | *Epoch 1* | *Epoch 10* | *Epoch 25*\n:---: | :---: | :---: | :---: |\nCGAN | \u003Cimg src = 'assets\u002Fmnist_results\u002Fconditional_generation\u002FCGAN_epoch000_test_all_classes_style_by_style.png' height = '230px'> | \u003Cimg src = 'assets\u002Fmnist_results\u002Fconditional_generation\u002FCGAN_epoch009_test_all_classes_style_by_style.png' height = '230px'> | \u003Cimg src = 'assets\u002Fmnist_results\u002Fconditional_generation\u002FCGAN_epoch024_test_all_classes_style_by_style.png' height = '230px'>\nACGAN | \u003Cimg src = 'assets\u002Fmnist_results\u002Fconditional_generation\u002FACGAN_epoch000_test_all_classes_style_by_style.png' height = '230px'> | \u003Cimg src = 'assets\u002Fmnist_results\u002Fconditional_generation\u002FACGAN_epoch009_test_all_classes_style_by_style.png' height = '230px'> | \u003Cimg src = 'assets\u002Fmnist_results\u002Fconditional_generation\u002FACGAN_epoch024_test_all_classes_style_by_style.png' height = '230px'>\ninfoGAN | \u003Cimg src = 'assets\u002Fmnist_results\u002Fconditional_generation\u002FinfoGAN_epoch000_test_all_classes_style_by_style.png' height = '230px'> | \u003Cimg src = 'assets\u002Fmnist_results\u002Fconditional_generation\u002FinfoGAN_epoch009_test_all_classes_style_by_style.png' height = '230px'> | \u003Cimg src = 'assets\u002Fmnist_results\u002Fconditional_generation\u002FinfoGAN_epoch024_test_all_classes_style_by_style.png' height = '230px'>\n\n#### InfoGAN : Manipulating two continous codes\n\u003Ctable align='center'>\n\u003Ctd>\u003Cimg src = 'assets\u002Fmnist_results\u002Finfogan\u002FinfoGAN_epoch024_test_class_c1c2_2.png' height = '200px'>\u003C\u002Ftd>\n\u003Ctd>\u003Cimg src = 'assets\u002Fmnist_results\u002Finfogan\u002FinfoGAN_epoch024_test_class_c1c2_5.png' height = '200px'>\u003C\u002Ftd>\n\u003Ctd>\u003Cimg src = 'assets\u002Fmnist_results\u002Finfogan\u002FinfoGAN_epoch024_test_class_c1c2_7.png' height = '200px'>\u003C\u002Ftd>\n\u003Ctd>\u003Cimg src = 'assets\u002Fmnist_results\u002Finfogan\u002FinfoGAN_epoch024_test_class_c1c2_9.png' height = '200px'>\u003C\u002Ftd>\n\u003C\u002Ftable>\n\n### Results for fashion-mnist\nComments on network architecture in mnist are also applied to here.  \n[Fashion-mnist](https:\u002F\u002Fgithub.com\u002Fzalandoresearch\u002Ffashion-mnist) is a recently proposed dataset consisting of a training set of 60,000 examples and a test set of 10,000 examples. Each example is a 28x28 grayscale image, associated with a label from 10 classes. (T-shirt\u002Ftop, Trouser, Pullover, Dress, Coat, Sandal, Shirt, Sneaker, Bag, Ankle boot)\n\nThe following results can be reproduced with command:  \n```\npython main.py --dataset fashion-mnist --gan_type \u003CTYPE> --epoch 40 --batch_size 64\n```\n\n#### Random generation\nAll results are randomly sampled.\n\n*Name* | *Epoch 1* | *Epoch 20* | *Epoch 40*\n:---: | :---: | :---: | :---: |\nGAN | \u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Frandom_generation\u002FGAN_epoch000_test_all_classes.png' height = '230px'> | \u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Frandom_generation\u002FGAN_epoch019_test_all_classes.png' height = '230px'> | \u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Frandom_generation\u002FGAN_epoch039_test_all_classes.png' height = '230px'>\nLSGAN | \u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Frandom_generation\u002FLSGAN_epoch000_test_all_classes.png' height = '230px'> | \u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Frandom_generation\u002FLSGAN_epoch019_test_all_classes.png' height = '230px'> | \u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Frandom_generation\u002FLSGAN_epoch039_test_all_classes.png' height = '230px'>\nWGAN | \u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Frandom_generation\u002FWGAN_epoch000_test_all_classes.png' height = '230px'> | \u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Frandom_generation\u002FWGAN_epoch019_test_all_classes.png' height = '230px'> | \u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Frandom_generation\u002FWGAN_epoch039_test_all_classes.png' height = '230px'>\nWGAN_GP | \u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Frandom_generation\u002FWGAN_GP_epoch000_test_all_classes.png' height = '230px'> | \u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Frandom_generation\u002FWGAN_GP_epoch019_test_all_classes.png' height = '230px'> | \u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Frandom_generation\u002FWGAN_GP_epoch039_test_all_classes.png' height = '230px'>\nDRAGAN | \u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Frandom_generation\u002FDRAGAN_epoch000_test_all_classes.png' height = '230px'> | \u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Frandom_generation\u002FDRAGAN_epoch019_test_all_classes.png' height = '230px'> | \u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Frandom_generation\u002FDRAGAN_epoch039_test_all_classes.png' height = '230px'>\nEBGAN | \u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Frandom_generation\u002FEBGAN_epoch000_test_all_classes.png' height = '230px'> | \u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Frandom_generation\u002FEBGAN_epoch019_test_all_classes.png' height = '230px'> | \u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Frandom_generation\u002FEBGAN_epoch039_test_all_classes.png' height = '230px'>\nBEGAN | \u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Frandom_generation\u002FBEGAN_epoch000_test_all_classes.png' height = '230px'> | \u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Frandom_generation\u002FBEGAN_epoch019_test_all_classes.png' height = '230px'> | \u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Frandom_generation\u002FBEGAN_epoch039_test_all_classes.png' height = '230px'>\n\n#### Conditional generation\nEach row has the same noise vector and each column has the same label condition.\n\n*Name* | *Epoch 1* | *Epoch 20* | *Epoch 40*\n:---: | :---: | :---: | :---: |\nCGAN | \u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Fconditional_generation\u002FCGAN_epoch000_test_all_classes_style_by_style.png' height = '230px'> | \u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Fconditional_generation\u002FCGAN_epoch019_test_all_classes_style_by_style.png' height = '230px'> | \u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Fconditional_generation\u002FCGAN_epoch039_test_all_classes_style_by_style.png' height = '230px'>\nACGAN | \u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Fconditional_generation\u002FACGAN_epoch000_test_all_classes_style_by_style.png' height = '230px'> | \u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Fconditional_generation\u002FACGAN_epoch019_test_all_classes_style_by_style.png' height = '230px'> | \u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Fconditional_generation\u002FACGAN_epoch039_test_all_classes_style_by_style.png' height = '230px'>\ninfoGAN | \u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Fconditional_generation\u002FinfoGAN_epoch000_test_all_classes_style_by_style.png' height = '230px'> | \u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Fconditional_generation\u002FinfoGAN_epoch019_test_all_classes_style_by_style.png' height = '230px'> | \u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Fconditional_generation\u002FinfoGAN_epoch039_test_all_classes_style_by_style.png' height = '230px'>\n\nWithout hyper-parameter tuning from mnist-version, ACGAN\u002FinfoGAN does not work well as compared with CGAN.  \nACGAN tends to fall into mode-collapse.  \ninfoGAN tends to ignore noise-vector. It results in that various style within the same class can not be represented.\n\n#### InfoGAN : Manipulating two continous codes\n\u003Ctable align='center'>\n\u003Ctd>\u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Finfogan\u002FinfoGAN_epoch039_test_class_c1c2_1.png' height = '230px'>\u003C\u002Ftd>\n\u003Ctd>\u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Finfogan\u002FinfoGAN_epoch039_test_class_c1c2_4.png' height = '230px'>\u003C\u002Ftd>\n\u003Ctd>\u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Finfogan\u002FinfoGAN_epoch039_test_class_c1c2_5.png' height = '230px'>\u003C\u002Ftd>\n\u003Ctd>\u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Finfogan\u002FinfoGAN_epoch039_test_class_c1c2_8.png' height = '230px'>\u003C\u002Ftd>\n\u003C\u002Ftable>\n\n### Some results for celebA\n(to be added)\n\n## Variational Auto-Encoders (VAEs)\n\n### Lists\n\n*Name* | *Paper Link* | *Loss Function*\n:---: | :---: | :---\n**VAE**| [Arxiv](https:\u002F\u002Farxiv.org\u002Fabs\u002F1312.6114) | \u003Cimg src = 'assets\u002Fequations\u002FVAE.png' height = '35px'>\n**CVAE**| [Arxiv](https:\u002F\u002Farxiv.org\u002Fabs\u002F1406.5298) | \u003Cimg src = 'assets\u002Fequations\u002FCVAE.png' height = '35px'>\n**DVAE**| [Arxiv](https:\u002F\u002Farxiv.org\u002Fabs\u002F1511.06406) | (to be added)\n**AAE**| [Arxiv](https:\u002F\u002Farxiv.org\u002Fabs\u002F1511.05644) | (to be added) \n\n#### Variants of VAE structure\n\u003Cimg src = 'assets\u002Fetc\u002FVAE_structure.png' height = '280px'>\n\n### Results for mnist\nNetwork architecture of decoder(generator) and encoder(discriminator) is the exaclty sames as in [infoGAN paper](https:\u002F\u002Farxiv.org\u002Fabs\u002F1606.0365). The number of output nodes in encoder is different. (2x z_dim for VAE, 1 for GAN)\n\nThe following results can be reproduced with command:  \n```\npython main.py --dataset mnist --gan_type \u003CTYPE> --epoch 25 --batch_size 64\n```\n\n#### Random generation\nAll results are randomly sampled.\n\n*Name* | *Epoch 1* | *Epoch 10* | *Epoch 25*\n:---: | :---: | :---: | :---: |\nVAE | \u003Cimg src = 'assets\u002Fmnist_results\u002Frandom_generation\u002FVAE_epoch000_test_all_classes.png' height = '230px'> | \u003Cimg src = 'assets\u002Fmnist_results\u002Frandom_generation\u002FVAE_epoch009_test_all_classes.png' height = '230px'> | \u003Cimg src = 'assets\u002Fmnist_results\u002Frandom_generation\u002FVAE_epoch024_test_all_classes.png' height = '230px'>\nGAN | \u003Cimg src = 'assets\u002Fmnist_results\u002Frandom_generation\u002FGAN_epoch000_test_all_classes.png' height = '230px'> | \u003Cimg src = 'assets\u002Fmnist_results\u002Frandom_generation\u002FGAN_epoch009_test_all_classes.png' height = '230px'> | \u003Cimg src = 'assets\u002Fmnist_results\u002Frandom_generation\u002FGAN_epoch024_test_all_classes.png' height = '230px'>\n\nResults of GAN is also given to compare images generated from VAE and GAN.\nThe main difference (VAE generates smooth and blurry images, otherwise GAN generates sharp and artifact images) is cleary observed from the results.\n\n#### Conditional generation\nEach row has the same noise vector and each column has the same label condition.\n\n*Name* | *Epoch 1* | *Epoch 10* | *Epoch 25*\n:---: | :---: | :---: | :---: |\nCVAE | \u003Cimg src = 'assets\u002Fmnist_results\u002Fconditional_generation\u002FCVAE_epoch000_test_all_classes_style_by_style.png' height = '230px'> | \u003Cimg src = 'assets\u002Fmnist_results\u002Fconditional_generation\u002FCVAE_epoch009_test_all_classes_style_by_style.png' height = '230px'> | \u003Cimg src = 'assets\u002Fmnist_results\u002Fconditional_generation\u002FCVAE_epoch024_test_all_classes_style_by_style.png' height = '230px'>\nCGAN | \u003Cimg src = 'assets\u002Fmnist_results\u002Fconditional_generation\u002FCGAN_epoch000_test_all_classes_style_by_style.png' height = '230px'> | \u003Cimg src = 'assets\u002Fmnist_results\u002Fconditional_generation\u002FCGAN_epoch009_test_all_classes_style_by_style.png' height = '230px'> | \u003Cimg src = 'assets\u002Fmnist_results\u002Fconditional_generation\u002FCGAN_epoch024_test_all_classes_style_by_style.png' height = '230px'>\n\nResults of CGAN is also given to compare images generated from CVAE and CGAN.\n\n#### Learned manifold\n\nThe following results can be reproduced with command:  \n```\npython main.py --dataset mnist --gan_type VAE --epoch 25 --batch_size 64 --dim_z 2\n```\nPlease notice that dimension of noise-vector z is 2.\n\n*Name* | *Epoch 1* | *Epoch 10* | *Epoch 25*\n:---: | :---: | :---: | :---: |\nVAE | \u003Cimg src = 'assets\u002Fmnist_results\u002Flearned_manifold\u002FVAE_epoch000_learned_manifold.png' height = '230px'> | \u003Cimg src = 'assets\u002Fmnist_results\u002Flearned_manifold\u002FVAE_epoch009_learned_manifold.png' height = '230px'> | \u003Cimg src = 'assets\u002Fmnist_results\u002Flearned_manifold\u002FVAE_epoch024_learned_manifold.png' height = '230px'>\n\n### Results for fashion-mnist\nComments on network architecture in mnist are also applied to here. \n\nThe following results can be reproduced with command:  \n```\npython main.py --dataset fashion-mnist --gan_type \u003CTYPE> --epoch 40 --batch_size 64\n```\n\n#### Random generation\nAll results are randomly sampled.\n\n*Name* | *Epoch 1* | *Epoch 20* | *Epoch 40*\n:---: | :---: | :---: | :---: |\nVAE | \u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Frandom_generation\u002FVAE_epoch000_test_all_classes.png' height = '230px'> | \u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Frandom_generation\u002FVAE_epoch019_test_all_classes.png' height = '230px'> | \u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Frandom_generation\u002FVAE_epoch039_test_all_classes.png' height = '230px'>\nGAN | \u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Frandom_generation\u002FGAN_epoch000_test_all_classes.png' height = '230px'> | \u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Frandom_generation\u002FGAN_epoch019_test_all_classes.png' height = '230px'> | \u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Frandom_generation\u002FGAN_epoch039_test_all_classes.png' height = '230px'>\n\nResults of GAN is also given to compare images generated from VAE and GAN.\n\n#### Conditional generation\nEach row has the same noise vector and each column has the same label condition.\n\n*Name* | *Epoch 1* | *Epoch 20* | *Epoch 40*\n:---: | :---: | :---: | :---: |\nCVAE | \u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Fconditional_generation\u002FCVAE_epoch000_test_all_classes_style_by_style.png' height = '230px'> | \u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Fconditional_generation\u002FCVAE_epoch019_test_all_classes_style_by_style.png' height = '230px'> | \u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Fconditional_generation\u002FCVAE_epoch039_test_all_classes_style_by_style.png' height = '230px'>\nCGAN | \u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Fconditional_generation\u002FCGAN_epoch000_test_all_classes_style_by_style.png' height = '230px'> | \u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Fconditional_generation\u002FCGAN_epoch019_test_all_classes_style_by_style.png' height = '230px'> | \u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Fconditional_generation\u002FCGAN_epoch039_test_all_classes_style_by_style.png' height = '230px'>\n\nResults of CGAN is also given to compare images generated from CVAE and CGAN.\n\n#### Learned manifold\n\nThe following results can be reproduced with command:  \n```\npython main.py --dataset fashion-mnist --gan_type VAE --epoch 25 --batch_size 64 --dim_z 2\n```\nPlease notice that dimension of noise-vector z is 2.\n\n*Name* | *Epoch 1* | *Epoch 10* | *Epoch 25*\n:---: | :---: | :---: | :---: |\nVAE | \u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Flearned_manifold\u002FVAE_epoch000_learned_manifold.png' height = '230px'> | \u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Flearned_manifold\u002FVAE_epoch009_learned_manifold.png' height = '230px'> | \u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Flearned_manifold\u002FVAE_epoch024_learned_manifold.png' height = '230px'>\n\n### Results for celebA\n(to be added)\n\n## Folder structure\nThe following shows basic folder structure.\n```\n├── main.py # gateway\n├── data\n│   ├── mnist # mnist data (not included in this repo)\n│   |   ├── t10k-images-idx3-ubyte.gz\n│   |   ├── t10k-labels-idx1-ubyte.gz\n│   |   ├── train-images-idx3-ubyte.gz\n│   |   └── train-labels-idx1-ubyte.gz\n│   └── fashion-mnist # fashion-mnist data (not included in this repo)\n│       ├── t10k-images-idx3-ubyte.gz\n│       ├── t10k-labels-idx1-ubyte.gz\n│       ├── train-images-idx3-ubyte.gz\n│       └── train-labels-idx1-ubyte.gz\n├── GAN.py # vanilla GAN\n├── ops.py # some operations on layer\n├── utils.py # utils\n├── logs # log files for tensorboard to be saved here\n└── checkpoint # model files to be saved here\n```\n\n## Acknowledgements\nThis implementation has been based on [this repository](https:\u002F\u002Fgithub.com\u002Fcarpedm20\u002FDCGAN-tensorflow) and tested with Tensorflow over ver1.0 on Windows 10 and Ubuntu 14.04.\n","# tensorflow-generative-model-collections\nTensorFlow 实现的各种 GAN 和 VAE。\n\n## 相关仓库\n### PyTorch 版本\n该仓库的 PyTorch 版本可在 https:\u002F\u002Fgithub.com\u002Fznxlwm\u002Fpytorch-generative-model-collections 找到。\n\n### 论文《GAN 是否等价？一项大规模研究》\nhttps:\u002F\u002Fgithub.com\u002Fgoogle\u002Fcompare_gan 是 [这篇论文](https:\u002F\u002Farxiv.org\u002Fabs\u002F1711.10337) 中使用的代码。它提供了所有 GAN 变体的 IS\u002FFID 指标及丰富的实验结果。\n\n## 生成对抗网络 (GANs)\n### 列表\n\n*名称* | *论文链接* | *目标函数*\n:---: | :---: | :---:\n**GAN** | [Arxiv](https:\u002F\u002Farxiv.org\u002Fabs\u002F1406.2661) | \u003Cimg src = 'assets\u002Fequations\u002FGAN.png' height = '70px'>\n**LSGAN**| [Arxiv](https:\u002F\u002Farxiv.org\u002Fabs\u002F1611.04076) | \u003Cimg src = 'assets\u002Fequations\u002FLSGAN.png' height = '70px'>\n**WGAN**| [Arxiv](https:\u002F\u002Farxiv.org\u002Fabs\u002F1701.07875) | \u003Cimg src = 'assets\u002Fequations\u002FWGAN.png' height = '105px'>\n**WGAN_GP**| [Arxiv](https:\u002F\u002Farxiv.org\u002Fabs\u002F1704.00028) | \u003Cimg src = 'assets\u002Fequations\u002FWGAN_GP.png' height = '70px'>\n**DRAGAN**| [Arxiv](https:\u002F\u002Farxiv.org\u002Fabs\u002F1705.07215) | \u003Cimg src = 'assets\u002Fequations\u002FDRAGAN.png' height = '70px'>\n**CGAN**| [Arxiv](https:\u002F\u002Farxiv.org\u002Fabs\u002F1411.1784) | \u003Cimg src = 'assets\u002Fequations\u002FCGAN.png' height = '70px'>\n**infoGAN**| [Arxiv](https:\u002F\u002Farxiv.org\u002Fabs\u002F1606.03657) | \u003Cimg src = 'assets\u002Fequations\u002FinfoGAN.png' height = '70px'>\n**ACGAN**| [Arxiv](https:\u002F\u002Farxiv.org\u002Fabs\u002F1610.09585) | \u003Cimg src = 'assets\u002Fequations\u002FACGAN.png' height = '70px'>\n**EBGAN**| [Arxiv](https:\u002F\u002Farxiv.org\u002Fabs\u002F1609.03126) | \u003Cimg src = 'assets\u002Fequations\u002FEBGAN.png' height = '70px'>\n**BEGAN**| [Arxiv](https:\u002F\u002Farxiv.org\u002Fabs\u002F1702.08431) | \u003Cimg src = 'assets\u002Fequations\u002FBEGAN.png' height = '105px'>\n\n#### GAN 结构的变体\n\u003Cimg src = 'assets\u002Fetc\u002FGAN_structure.png' height = '600px'\n\n### MNIST 数据集上的结果\n生成器和判别器的网络架构与 [infoGAN 论文](https:\u002F\u002Farxiv.org\u002Fabs\u002F1606.03657) 中完全一致。为了公平比较所有 GAN 变体的核心思想，除 EBGAN 和 BEGAN 外，其他实现均保持相同的网络架构。由于 EBGAN 和 BEGAN 采用了自编码器结构作为判别器，因此对其进行了小幅修改，但尽量保持了判别器的容量。\n\n以下结果可通过以下命令重现：\n```\npython main.py --dataset mnist --gan_type \u003CTYPE> --epoch 25 --batch_size 64\n```\n\n#### 随机生成\n所有结果均为随机采样。\n\n*名称* | *第 2 轮* | *第 10 轮* | *第 25 轮*\n:---: | :---: | :---: | :---:\nGAN | \u003Cimg src = 'assets\u002Fmnist_results\u002Frandom_generation\u002FGAN_epoch001_test_all_classes.png' height = '230px'> | \u003Cimg src = 'assets\u002Fmnist_results\u002Frandom_generation\u002FGAN_epoch009_test_all_classes.png' height = '230px'> | \u003Cimg src = 'assets\u002Fmnist_results\u002Frandom_generation\u002FGAN_epoch024_test_all_classes.png' height = '230px'>\nLSGAN | \u003Cimg src = 'assets\u002Fmnist_results\u002Frandom_generation\u002FLSGAN_epoch001_test_all_classes.png' height = '230px'> | \u003Cimg src = 'assets\u002Fmnist_results\u002Frandom_generation\u002FLSGAN_epoch009_test_all_classes.png' height = '230px'> | \u003Cimg src = 'assets\u002Fmnist_results\u002Frandom_generation\u002FLSGAN_epoch024_test_all_classes.png' height = '230px'>\nWGAN | \u003Cimg src = 'assets\u002Fmnist_results\u002Frandom_generation\u002FWGAN_epoch001_test_all_classes.png' height = '230px'> | \u003Cimg src = 'assets\u002Fmnist_results\u002Frandom_generation\u002FWGAN_epoch009_test_all_classes.png' height = '230px'> | \u003Cimg src = 'assets\u002Fmnist_results\u002Frandom_generation\u002FWGAN_epoch024_test_all_classes.png' height = '230px'>\nWGAN_GP | \u003Cimg src = 'assets\u002Fmnist_results\u002Frandom_generation\u002FWGAN_GP_epoch001_test_all_classes.png' height = '230px'> | \u003Cimg src = 'assets\u002Fmnist_results\u002Frandom_generation\u002FWGAN_GP_epoch009_test_all_classes.png' height = '230px'> | \u003Cimg src = 'assets\u002Fmnist_results\u002Frandom_generation\u002FWGAN_GP_epoch024_test_all_classes.png' height = '230px'>\nDRAGAN | \u003Cimg src = 'assets\u002Fmnist_results\u002Frandom_generation\u002FDRAGAN_epoch001_test_all_classes.png' height = '230px'> | \u003Cimg src = 'assets\u002Fmnist_results\u002Frandom_generation\u002FDRAGAN_epoch009_test_all_classes.png' height = '230px'> | \u003Cimg src = 'assets\u002Fmnist_results\u002Frandom_generation\u002FDRAGAN_epoch024_test_all_classes.png' height = '230px'>\nEBGAN | \u003Cimg src = 'assets\u002Fmnist_results\u002Frandom_generation\u002FEBGAN_epoch001_test_all_classes.png' height = '230px'> | \u003Cimg src = 'assets\u002Fmnist_results\u002Frandom_generation\u002FEBGAN_epoch009_test_all_classes.png' height = '230px'> | \u003Cimg src = 'assets\u002Fmnist_results\u002Frandom_generation\u002FEBGAN_epoch024_test_all_classes.png' height = '230px'>\nBEGAN | \u003Cimg src = 'assets\u002Fmnist_results\u002Frandom_generation\u002FBEGAN_epoch001_test_all_classes.png' height = '230px'> | \u003Cimg src = 'assets\u002Fmnist_results\u002Frandom_generation\u002FBEGAN_epoch009_test_all_classes.png' height = '230px'> | \u003Cimg src = 'assets\u002Fmnist_results\u002Frandom_generation\u002FBEGAN_epoch024_test_all_classes.png' height = '230px'>\n\n#### 条件生成\n每一行使用相同的噪声向量，每一列具有相同的标签条件。\n\n*名称* | *第 1 轮* | *第 10 轮* | *第 25 轮*\n:---: | :---: | :---: | :---:\nCGAN | \u003Cimg src = 'assets\u002Fmnist_results\u002Fconditional_generation\u002FCGAN_epoch000_test_all_classes_style_by_style.png' height = '230px'> | \u003Cimg src = 'assets\u002Fmnist_results\u002Fconditional_generation\u002FCGAN_epoch009_test_all_classes_style_by_style.png' height = '230px'> | \u003Cimg src = 'assets\u002Fmnist_results\u002Fconditional_generation\u002FCGAN_epoch024_test_all_classes_style_by_style.png' height = '230px'>\nACGAN | \u003Cimg src = 'assets\u002Fmnist_results\u002Fconditional_generation\u002FACGAN_epoch000_test_all_classes_style_by_style.png' height = '230px'> | \u003Cimg src = 'assets\u002Fmnist_results\u002Fconditional_generation\u002FACGAN_epoch009_test_all_classes_style_by_style.png' height = '230px'> | \u003Cimg src = 'assets\u002Fmnist_results\u002Fconditional_generation\u002FACGAN_epoch024_test_all_classes_style_by_style.png' height = '230px'>\ninfoGAN | \u003Cimg src = 'assets\u002Fmnist_results\u002Fconditional_generation\u002FinfoGAN_epoch000_test_all_classes_style_by_style.png' height = '230px'> | \u003Cimg src = 'assets\u002Fmnist_results\u002Fconditional_generation\u002FinfoGAN_epoch009_test_all_classes_style_by_style.png' height = '230px'> | \u003Cimg src = 'assets\u002Fmnist_results\u002Fconditional_generation\u002FinfoGAN_epoch024_test_all_classes_style_by_style.png' height = '230px'>\n\n#### InfoGAN：操纵两个连续变量\n\u003Ctable align='center'>\n\u003Ctd>\u003Cimg src = 'assets\u002Fmnist_results\u002Finfogan\u002FinfoGAN_epoch024_test_class_c1c2_2.png' height = '200px'>\u003C\u002Ftd>\n\u003Ctd>\u003Cimg src = 'assets\u002Fmnist_results\u002Finfogan\u002FinfoGAN_epoch024_test_class_c1c2_5.png' height = '200px'>\u003C\u002Ftd>\n\u003Ctd>\u003Cimg src = 'assets\u002Fmnist_results\u002Finfogan\u002FinfoGAN_epoch024_test_class_c1c2_7.png' height = '200px'>\u003C\u002Ftd>\n\u003Ctd>\u003Cimg src = 'assets\u002Fmnist_results\u002Finfogan\u002FinfoGAN_epoch024_test_class_c1c2_9.png' height = '200px'>\u003C\u002Ftd>\n\u003C\u002Ftable>\n\n### Fashion-MNIST 的结果\n关于 MNIST 数据集的网络架构评论同样适用于此处。  \n[Fashion-MNIST](https:\u002F\u002Fgithub.com\u002Fzalandoresearch\u002Ffashion-mnist) 是一个近期提出的数据集，包含 60,000 个训练样本和 10,000 个测试样本。每个样本是一张 28×28 的灰度图像，并对应 10 个类别中的一个标签。（T恤\u002F上衣、长裤、套头衫、连衣裙、外套、凉鞋、衬衫、运动鞋、手提包、短靴）\n\n以下结果可以通过以下命令复现：  \n```\npython main.py --dataset fashion-mnist --gan_type \u003CTYPE> --epoch 40 --batch_size 64\n```\n\n#### 随机生成\n所有结果均为随机采样。\n\n*名称* | *第1轮* | *第20轮* | *第40轮*\n:---: | :---: | :---: | :---: |\nGAN | \u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Frandom_generation\u002FGAN_epoch000_test_all_classes.png' height = '230px'> | \u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Frandom_generation\u002FGAN_epoch019_test_all_classes.png' height = '230px'> | \u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Frandom_generation\u002FGAN_epoch039_test_all_classes.png' height = '230px'>\nLSGAN | \u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Frandom_generation\u002FLSGAN_epoch000_test_all_classes.png' height = '230px'> | \u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Frandom_generation\u002FLSGAN_epoch019_test_all_classes.png' height = '230px'> | \u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Frandom_generation\u002FLSGAN_epoch039_test_all_classes.png' height = '230px'>\nWGAN | \u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Frandom_generation\u002FWGAN_epoch000_test_all_classes.png' height = '230px'> | \u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Frandom_generation\u002FWGAN_epoch019_test_all_classes.png' height = '230px'> | \u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Frandom_generation\u002FWGAN_epoch039_test_all_classes.png' height = '230px'>\nWGAN_GP | \u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Frandom_generation\u002FWGAN_GP_epoch000_test_all_classes.png' height = '230px'> | \u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Frandom_generation\u002FWGAN_GP_epoch019_test_all_classes.png' height = '230px'> | \u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Frandom_generation\u002FWGAN_GP_epoch039_test_all_classes.png' height = '230px'>\nDRAGAN | \u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Frandom_generation\u002FDRAGAN_epoch000_test_all_classes.png' height = '230px'> | \u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Frandom_generation\u002FDRAGAN_epoch019_test_all_classes.png' height = '230px'> | \u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Frandom_generation\u002FDRAGAN_epoch039_test_all_classes.png' height = '230px'>\nEBGAN | \u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Frandom_generation\u002FEBGAN_epoch000_test_all_classes.png' height = '230px'> | \u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Frandom_generation\u002FEBGAN_epoch019_test_all_classes.png' height = '230px'> | \u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Frandom_generation\u002FEBGAN_epoch039_test_all_classes.png' height = '230px'>\nBEGAN | \u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Frandom_generation\u002FBEGAN_epoch000_test_all_classes.png' height = '230px'> | \u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Frandom_generation\u002FBEGAN_epoch019_test_all_classes.png' height = '230px'> | \u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Frandom_generation\u002FBEGAN_epoch039_test_all_classes.png' height = '230px'>\n\n#### 条件生成\n每一行使用相同的噪声向量，每一列则具有相同的标签条件。\n\n*名称* | *第1轮* | *第20轮* | *第40轮*\n:---: | :---: | :---: | :---: |\nCGAN | \u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Fconditional_generation\u002FCGAN_epoch000_test_all_classes_style_by_style.png' height = '230px'> | \u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Fconditional_generation\u002FCGAN_epoch019_test_all_classes_style_by_style.png' height = '230px'> | \u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Fconditional_generation\u002FCGAN_epoch039_test_all_classes_style_by_style.png' height = '230px'>\nACGAN | \u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Fconditional_generation\u002FACGAN_epoch000_test_all_classes_style_by_style.png' height = '230px'> | \u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Fconditional_generation\u002FACGAN_epoch019_test_all_classes_style_by_style.png' height = '230px'> | \u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Fconditional generation\u002FACGAN_epoch039_test_all_classes_style_by_style.png' height = '230px'>\ninfoGAN | \u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Fconditional_generation\u002FinfoGAN_epoch000_test_all_classes_style_by_style.png' height = '230px'> | \u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Fconditional generation\u002FinfoGAN_epoch019_test_all_classes_style_by_style.png' height = '230px'> | \u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Fconditional generation\u002FinfoGAN_epoch039_test_all_classes_style by style.png' height = '230px'>\n\n在未对超参数进行调优的情况下，与 CGAN 相比，ACGAN 和 infoGAN 的效果并不理想。  \nACGAN 容易陷入模式坍塌。  \ninfoGAN 则倾向于忽略噪声向量，导致同一类别内的不同风格无法被有效表示。\n\n#### InfoGAN：操控两个连续编码\n\u003Ctable align='center'>\n\u003Ctd>\u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Finfogan\u002FinfoGAN_epoch039_test_class_c1c2_1.png' height = '230px'>\u003C\u002Ftd>\n\u003Ctd>\u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Finfogan\u002FinfoGAN_epoch039_test_class_c1c2_4.png' height = '230px'>\u003C\u002Ftd>\n\u003Ctd>\u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Finfogan\u002FinfoGAN_epoch039_test_class_c1c2_5.png' height = '230px'>\u003C\u002Ftd>\n\u003Ctd>\u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Finfogan\u002FinfoGAN_epoch039_test_class_c1c2_8.png' height = '230px'>\u003C\u002Ftd>\n\u003C\u002Ftable>\n\n### CelebA 的部分结果\n（待补充）\n\n## 变分自编码器 (VAEs)\n\n### 列表\n\n*名称* | *论文链接* | *损失函数*\n:---: | :---: | :---\n**VAE**| [Arxiv](https:\u002F\u002Farxiv.org\u002Fabs\u002F1312.6114) | \u003Cimg src = 'assets\u002Fequations\u002FVAE.png' height = '35px'>\n**CVAE**| [Arxiv](https:\u002F\u002Farxiv.org\u002Fabs\u002F1406.5298) | \u003Cimg src = 'assets\u002Fequations\u002FCVAE.png' height = '35px'>\n**DVAE**| [Arxiv](https:\u002F\u002Farxiv.org\u002Fabs\u002F1511.06406) | （待补充）\n**AAE**| [Arxiv](https:\u002F\u002Farxiv.org\u002Fabs\u002F1511.05644) | （待补充） \n\n#### VAE 结构的变体\n\u003Cimg src = 'assets\u002Fetc\u002FVAE_structure.png' height = '280px'>\n\n### MNIST 数据集结果\n解码器（生成器）和编码器（判别器）的网络架构与 [InfoGAN 论文](https:\u002F\u002Farxiv.org\u002Fabs\u002F1606.0365) 中完全一致。不同之处在于编码器的输出节点数：VAE 为 2×z_dim，而 GAN 为 1。\n\n以下结果可通过以下命令复现：\n```\npython main.py --dataset mnist --gan_type \u003CTYPE> --epoch 25 --batch_size 64\n```\n\n#### 随机生成\n所有结果均为随机采样生成。\n\n*名称* | *第1轮* | *第10轮* | *第25轮*\n:---: | :---: | :---: | :---: |\nVAE | \u003Cimg src = 'assets\u002Fmnist_results\u002Frandom_generation\u002FVAE_epoch000_test_all_classes.png' height = '230px'> | \u003Cimg src = 'assets\u002Fmnist_results\u002Frandom_generation\u002FVAE_epoch009_test_all_classes.png' height = '230px'> | \u003Cimg src = 'assets\u002Fmnist_results\u002Frandom_generation\u002FVAE_epoch024_test_all_classes.png' height = '230px'>\nGAN | \u003Cimg src = 'assets\u002Fmnist_results\u002Frandom_generation\u002FGAN_epoch000_test_all_classes.png' height = '230px'> | \u003Cimg src = 'assets\u002Fmnist_results\u002Frandom_generation\u002FGAN_epoch009_test_all_classes.png' height = '230px'> | \u003Cimg src = 'assets\u002Fmnist_results\u002Frandom_generation\u002FGAN_epoch024_test_all_classes.png' height = '230px'>\n\n同时提供了 GAN 的结果，以便对比 VAE 和 GAN 生成的图像。从结果中可以明显看出主要区别：VAE 生成的图像较为平滑且模糊，而 GAN 生成的图像则更加清晰锐利，并伴有伪影。\n\n#### 条件生成\n每一行使用相同的噪声向量，每一列具有相同的标签条件。\n\n*名称* | *第1轮* | *第10轮* | *第25轮*\n:---: | :---: | :---: | :---: |\nCVAE | \u003Cimg src = 'assets\u002Fmnist_results\u002Fconditional_generation\u002FCVAE_epoch000_test_all_classes_style_by_style.png' height = '230px'> | \u003Cimg src = 'assets\u002Fmnist_results\u002Fconditional_generation\u002FCVAE_epoch009_test_all_classes_style_by_style.png' height = '230px'> | \u003Cimg src = 'assets\u002Fmnist_results\u002Fconditional_generation\u002FCVAE_epoch024_test_all_classes_style_by_style.png' height = '230px'>\nCGAN | \u003Cimg src = 'assets\u002Fmnist_results\u002Fconditional_generation\u002FCGAN_epoch000_test_all_classes_style_by_style.png' height = '230px'> | \u003Cimg src = 'assets\u002Fmnist_results\u002Fconditional_generation\u002FCGAN_epoch009_test_all_classes_style_by_style.png' height = '230px'> | \u003Cimg src = 'assets\u002Fmnist_results\u002Fconditional_generation\u002FCGAN_epoch024_test_all_classes_style_by_style.png' height = '230px'>\n\n同样提供了 CGAN 的结果，用于对比 CVAE 和 CGAN 生成的图像。\n\n#### 学习到的流形\n\n以下结果可通过以下命令复现：\n```\npython main.py --dataset mnist --gan_type VAE --epoch 25 --batch_size 64 --dim_z 2\n```\n请注意，噪声向量 z 的维度为 2。\n\n*名称* | *第1轮* | *第10轮* | *第25轮*\n:---: | :---: | :---: | :---: |\nVAE | \u003Cimg src = 'assets\u002Fmnist_results\u002Flearned_manifold\u002FVAE_epoch000_learned_manifold.png' height = '230px'> | \u003Cimg src = 'assets\u002Fmnist_results\u002Flearned_manifold\u002FVAE_epoch009_learned_manifold.png' height = '230px'> | \u003Cimg src = 'assets\u002Fmnist_results\u002Flearned_manifold\u002FVAE_epoch024_learned_manifold.png' height = '230px'>\n\n### Fashion-MNIST 数据集结果\n关于 MNIST 数据集网络架构的说明同样适用于此处。\n\n以下结果可通过以下命令复现：\n```\npython main.py --dataset fashion-mnist --gan_type \u003CTYPE> --epoch 40 --batch_size 64\n```\n\n#### 随机生成\n所有结果均为随机采样生成。\n\n*名称* | *第1轮* | *第20轮* | *第40轮*\n:---: | :---: | :---: | :---: |\nVAE | \u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Frandom_generation\u002FVAE_epoch000_test_all_classes.png' height = '230px'> | \u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Frandom_generation\u002FVAE_epoch019_test_all_classes.png' height = '230px'> | \u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Frandom_generation\u002FVAE_epoch039_test_all_classes.png' height = '230px'>\nGAN | \u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Frandom_generation\u002FGAN_epoch000_test_all_classes.png' height = '230px'> | \u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Frandom_generation\u002FGAN_epoch019_test_all_classes.png' height = '230px'> | \u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Frandom_generation\u002FGAN_epoch039_test_all_classes.png' height = '230px'>\n\n同样提供了 GAN 的结果，用于对比 VAE 和 GAN 生成的图像。\n\n#### 条件生成\n每一行使用相同的噪声向量，每一列具有相同的标签条件。\n\n*名称* | *第1轮* | *第20轮* | *第40轮*\n:---: | :---: | :---: | :---: |\nCVAE | \u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Fconditional_generation\u002FCVAE_epoch000_test_all_classes_style_by_style.png' height = '230px'> | \u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Fconditional_generation\u002FCVAE_epoch019_test_all_classes_style_by_style.png' height = '230px'> | \u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Fconditional_generation\u002FCVAE_epoch039_test_all_classes_style_by_style.png' height = '230px'>\nCGAN | \u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Fconditional_generation\u002FCGAN_epoch000_test_all_classes_style_by_style.png' height = '230px'> | \u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Fconditional_generation\u002FCGAN_epoch019_test_all_classes_style_by_style.png' height = '230px'> | \u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Fconditional_generation\u002FCGAN_epoch039_test_all_classes_style_by_style.png' height = '230px'>\n\n同样提供了 CGAN 的结果，用于对比 CVAE 和 CGAN 生成的图像。\n\n#### 学习到的流形\n\n以下结果可通过以下命令复现：\n```\npython main.py --dataset fashion-mnist --gan_type VAE --epoch 25 --batch_size 64 --dim_z 2\n```\n请注意，噪声向量 z 的维度为 2。\n\n*名称* | *第1轮* | *第10轮* | *第25轮*\n:---: | :---: | :---: | :---: |\nVAE | \u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Flearned_manifold\u002FVAE_epoch000_learned_manifold.png' height = '230px'> | \u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Flearned_manifold\u002FVAE_epoch009_learned_manifold.png' height = '230px'> | \u003Cimg src = 'assets\u002Ffashion_mnist_results\u002Flearned_manifold\u002FVAE_epoch024_learned_manifold.png' height = '230px'>\n\n### CelebA 数据集结果\n（待补充）\n\n## 文件夹结构\n以下是基本的文件夹结构：\n```\n├── main.py # 入口文件\n├── data\n│   ├── mnist # MNIST 数据集（未包含在本仓库中）\n│   |   ├── t10k-images-idx3-ubyte.gz\n│   |   ├── t10k-labels-idx1-ubyte.gz\n│   |   ├── train-images-idx3-ubyte.gz\n│   |   └── train-labels-idx1-ubyte.gz\n│   └── fashion-mnist # Fashion-MNIST 数据集（未包含在本仓库中）\n│       ├── t10k-images-idx3-ubyte.gz\n│       ├── t10k-labels-idx1-ubyte.gz\n│       ├── train-images-idx3-ubyte.gz\n│       └── train-labels-idx1-ubyte.gz\n├── GAN.py # 原始 GAN 实现\n├── ops.py # 层级操作相关代码\n├── utils.py # 工具函数\n├── logs # TensorBoard 日志文件存放目录\n└── checkpoint # 模型文件保存目录\n```\n\n## 致谢\n本实现基于 [此仓库](https:\u002F\u002Fgithub.com\u002Fcarpedm20\u002FDCGAN-tensorflow)，并在 Windows 10 和 Ubuntu 14.04 上使用 TensorFlow 1.0 版本进行了测试。","# tensorflow-generative-model-collections 快速上手指南\n\n本工具是基于 TensorFlow 实现的多种生成对抗网络（GAN）和变分自编码器（VAE）集合，支持包括 GAN、LSGAN、WGAN、InfoGAN 等在内的多种主流模型架构。\n\n## 环境准备\n\n在开始之前，请确保您的开发环境满足以下要求：\n\n*   **操作系统**: Linux, macOS 或 Windows\n*   **Python**: 建议版本 3.6 - 3.8 (需兼容对应的 TensorFlow 版本)\n*   **核心依赖**:\n    *   TensorFlow (GPU 或 CPU 版本)\n    *   NumPy\n    *   Matplotlib (用于可视化结果)\n    *   SciPy\n*   **硬件建议**: 虽然可在 CPU 上运行，但训练 GAN 模型强烈建议使用 NVIDIA GPU 以加速收敛。\n\n> **国内加速提示**：\n> 安装 Python 依赖时，推荐使用清华或阿里镜像源以提升下载速度：\n> `pip install -i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple \u003Cpackage_name>`\n\n## 安装步骤\n\n1.  **克隆仓库**\n    将项目代码下载到本地：\n    ```bash\n    git clone https:\u002F\u002Fgithub.com\u002Fhwalsuklee\u002Ftensorflow-generative-model-collections.git\n    cd tensorflow-generative-model-collections\n    ```\n\n2.  **安装依赖**\n    项目中通常包含 `requirements.txt`，如果没有，请手动安装核心库。推荐使用国内镜像源：\n    ```bash\n    pip install -r requirements.txt -i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple\n    ```\n    如果缺少 `requirements.txt`，请直接安装基础依赖：\n    ```bash\n    pip install tensorflow numpy matplotlib scipy -i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple\n    ```\n\n3.  **准备数据集**\n    该工具内置了对 **MNIST** 和 **Fashion-MNIST** 数据集的自动下载功能（通过 TensorFlow 或 Keras API），首次运行时会自动获取数据，无需手动配置。\n\n## 基本使用\n\n该项目通过 `main.py` 脚本统一入口，通过参数控制模型类型、数据集和训练超参数。\n\n### 1. 在 MNIST 数据集上训练\n\n以下命令演示如何训练一个标准的 **GAN** 模型。您只需将 `\u003CTYPE>` 替换为支持的模型名称（如 `WGAN`, `LSGAN`, `infoGAN`, `CGAN` 等）。\n\n```bash\npython main.py --dataset mnist --gan_type GAN --epoch 25 --batch_size 64\n```\n\n*   `--dataset`: 选择数据集，支持 `mnist` 或 `fashion-mnist`。\n*   `--gan_type`: 选择模型架构，可选值包括 `GAN`, `LSGAN`, `WGAN`, `WGAN_GP`, `DRAGAN`, `CGAN`, `infoGAN`, `ACGAN`, `EBGAN`, `BEGAN`。\n*   `--epoch`: 训练轮数。\n*   `--batch_size`: 批次大小。\n\n训练过程中，生成的样本图像会保存在输出目录中，您可以直观地观察从第 1 轮到最后一轮的生成效果变化。\n\n### 2. 在 Fashion-MNIST 数据集上训练\n\nFashion-MNIST 数据集比 MNIST 更复杂，通常需要更多的训练轮数。以下是训练 **WGAN_GP** 的示例：\n\n```bash\npython main.py --dataset fashion-mnist --gan_type WGAN_GP --epoch 40 --batch_size 64\n```\n\n### 3. 查看结果\n\n运行结束后，检查项目根目录下的输出文件夹（通常为 `results` 或直接在资产目录中），您将看到：\n*   **Random generation**: 随机噪声生成的图像序列。\n*   **Conditional generation**: 基于标签条件生成的图像（适用于 CGAN, ACGAN, InfoGAN）。\n*   **Interpolation**: 潜在空间插值效果（适用于 InfoGAN）。\n\n> **注意**：部分模型（如 ACGAN 和 InfoGAN）在 Fashion-MNIST 上若未经过专门的超参数调优，可能会出现模式崩溃（mode-collapse）或忽略噪声向量的情况，这是原论文实现中的已知现象。","某初创公司的算法工程师团队正致力于开发一款基于手写风格迁移的个性化字体生成应用，需要快速验证多种生成对抗网络（GAN）架构在 MNIST 数据集上的表现以选定基线模型。\n\n### 没有 tensorflow-generative-model-collections 时\n- **重复造轮子耗时严重**：团队成员需分别查找 GAN、WGAN、LSGAN 等十余种变体的原始论文，手动复现复杂的损失函数和网络结构，仅环境搭建和代码调试就耗费数周。\n- **对比实验难以公平进行**：由于不同成员编写的代码在网络层数、参数初始化等细节上存在差异，导致无法判断模型效果差异是源于算法本身还是实现偏差，实验结论缺乏说服力。\n- **超参数调优盲目低效**：缺乏统一的训练脚本和标准评估流程，每次切换模型架构都需要重新调整学习率和批次大小，试错成本极高且容易陷入局部最优。\n- **技术选型依据不足**：在没有预置大规模对比数据的情况下，团队只能凭经验猜测哪种变体最适合当前任务，增加了项目前期的技术风险。\n\n### 使用 tensorflow-generative-model-collections 后\n- **即插即用加速原型开发**：直接调用库中已实现的 GAN、WGAN_GP、DRAGAN 等十多种成熟模型，通过一行命令即可启动训练，将模型验证周期从数周缩短至几天。\n- **确保实验控制变量严格**：所有变体共享完全一致的生成器与判别器架构（除特定结构需求外），消除了实现差异带来的干扰，让团队能精准评估各算法的核心优劣。\n- **标准化流程提升迭代效率**：利用统一的命令行接口和预设参数，团队可快速在不同架构间切换并自动记录结果，系统化地完成了多轮超参数敏感性分析。\n- **数据驱动的科学决策**：参考库中提供的 MNIST 标准生成结果及收敛曲线，团队迅速锁定 WGAN_GP 作为最佳基线，为后续复杂字体生成任务奠定了坚实基础。\n\ntensorflow-generative-model-collections 通过提供标准化、多样化的 GAN 实现集合，将研究人员从繁琐的代码复现中解放出来，使其能专注于核心算法的创新与业务场景的落地。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fhwalsuklee_tensorflow-generative-model-collections_150b1534.png","hwalsuklee",null,"https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fhwalsuklee_b7989c9f.jpg","NAVER Clova AI Research","hwalsuk.lee@gmail.com","https:\u002F\u002Fgithub.com\u002Fhwalsuklee",[79],{"name":80,"color":81,"percentage":82},"Python","#3572A5",100,3924,839,"2026-04-16T22:13:29","Apache-2.0","未说明","未说明 (基于 TensorFlow 的 GAN 实现，通常建议使用支持 CUDA 的 NVIDIA GPU 以加速训练，但 README 未指定具体型号或显存要求)",{"notes":90,"python":87,"dependencies":91},"该项目是多种 GAN 和 VAE 模型的 TensorFlow 实现。README 中未明确列出具体的版本依赖或硬件最低要求。根据提供的命令示例 (python main.py)，项目依赖标准的 Python 环境及 TensorFlow 库。由于涉及生成对抗网络训练，建议在具备 GPU 的环境中运行以获得合理速度，但具体配置需参考所用 TensorFlow 版本的官方建议。",[92,93,94],"tensorflow","numpy","matplotlib",[15,14],[97,98,99,100,101,102,103,104,105,106,107,92,108,109,110,111,112,113,114,115],"gan","vae","cgan","infogan","acgan","lsgan","wgan","dragan","ebgan","variational-autoencoder","began","mnist","fashion-mnist","wgan-gp","cvae","generative-adversarial-networks","generative-model","generative-models","improved-wgan","2026-03-27T02:49:30.150509","2026-04-19T06:02:49.118485",[119,124,129,134,139,144],{"id":120,"question_zh":121,"answer_zh":122,"source_url":123},41828,"InfoGAN 中的连续潜在损失（continuous latent loss）计算是否正确？","原代码中存在错误。`code_fake` 向量经过 softmax 非线性处理，范围在 [0,1]，而实际发送的潜在代码范围在 [-1,1]。正确的做法是使用 `code_logit_fake`（即 softmax 之前的 logits）来计算平方损失，而不是使用经过激活函数的输出。维护者已确认并修复了该代码。","https:\u002F\u002Fgithub.com\u002Fhwalsuklee\u002Ftensorflow-generative-model-collections\u002Fissues\u002F21",{"id":125,"question_zh":126,"answer_zh":127,"source_url":128},41829,"LSGAN 的判别器输出是否应该直接使用 logits 而不是 sigmoid 后的结果？","是的，原实现有误。根据 LSGAN 论文，计算损失函数时应直接使用判别器的 logits 输出，而不是经过 sigmoid 函数处理后的值。如果使用 sigmoid，梯度消失问题仍然存在。维护者已确认错误并修正了代码，确保在损失计算中使用 logits。","https:\u002F\u002Fgithub.com\u002Fhwalsuklee\u002Ftensorflow-generative-model-collections\u002Fissues\u002F19",{"id":130,"question_zh":131,"answer_zh":132,"source_url":133},41830,"WGAN-GP 实现中计算梯度惩罚时是否应该使用判别器的 logits？","是的，这是一个常见的实现错误。在计算梯度惩罚（gradient penalty）时，必须使用判别器的 logits 输出，而不是 sigmoid 激活后的输出。原始 WGAN-GP 实现中只返回 logits 用于此计算。维护者确认了该错误并已修复代码，改为使用 `logits of the Discriminator`。","https:\u002F\u002Fgithub.com\u002Fhwalsuklee\u002Ftensorflow-generative-model-collections\u002Fissues\u002F14",{"id":135,"question_zh":136,"answer_zh":137,"source_url":138},41831,"如何获取 MNIST 和 Fashion-MNIST 数据集？项目中找不到数据过滤文件。","项目中不包含数据文件，需要手动下载。下载地址如下：\n- MNIST: http:\u002F\u002Fyann.lecun.com\u002Fexdb\u002Fmnist\u002F\n- Fashion-MNIST: https:\u002F\u002Fgithub.com\u002Fzalandoresearch\u002Ffashion-mnist\n注意：MNIST 和 Fashion-MNIST 的数据文件名可能相同，下载时请留意区分。","https:\u002F\u002Fgithub.com\u002Fhwalsuklee\u002Ftensorflow-generative-model-collections\u002Fissues\u002F15",{"id":140,"question_zh":141,"answer_zh":142,"source_url":143},41832,"代码中判断数据集名称的条件语句 `if dataset_name == 'mnist' or 'fashion-mnist'` 是否有逻辑错误？","是的，这是一个逻辑错误。原写法 `if dataset_name == 'mnist' or 'fashion-mnist'` 中，后半部分 `'fashion-mnist'` 永远为真，导致条件始终成立。正确的写法应该是 `if dataset_name == 'mnist' or dataset_name == 'fashion-mnist'` 或者更简洁地写为 `if dataset_name in ['mnist', 'fashion-mnist']`。维护者已根据反馈更新了代码。","https:\u002F\u002Fgithub.com\u002Fhwalsuklee\u002Ftensorflow-generative-model-collections\u002Fissues\u002F4",{"id":145,"question_zh":146,"answer_zh":147,"source_url":148},41833,"如何处理 CelebA 数据集的多标签属性以训练 CGAN？","CelebA 的标签与 MNIST 不同，它不仅代表单一类别，某些图片可能包含多个属性类别。虽然具体实现细节需参考用户自行解决的方案，但通常需要将多标签转换为适合 CGAN 输入的格式（例如独热编码或多热编码），或者针对特定属性进行子集筛选。该问题已被提问者标记为已解决。","https:\u002F\u002Fgithub.com\u002Fhwalsuklee\u002Ftensorflow-generative-model-collections\u002Fissues\u002F18",[]]