[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-infocusp--tf_cnnvis":3,"tool-infocusp--tf_cnnvis":64},[4,17,27,35,44,52],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":16},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,3,"2026-04-05T11:01:52",[13,14,15],"开发框架","图像","Agent","ready",{"id":18,"name":19,"github_repo":20,"description_zh":21,"stars":22,"difficulty_score":23,"last_commit_at":24,"category_tags":25,"status":16},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 真正成长为懂上",140436,2,"2026-04-05T23:32:43",[13,15,26],"语言模型",{"id":28,"name":29,"github_repo":30,"description_zh":31,"stars":32,"difficulty_score":23,"last_commit_at":33,"category_tags":34,"status":16},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 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",107662,"2026-04-03T11:11:01",[13,14,15],{"id":36,"name":37,"github_repo":38,"description_zh":39,"stars":40,"difficulty_score":10,"last_commit_at":41,"category_tags":42,"status":16},4292,"Deep-Live-Cam","hacksider\u002FDeep-Live-Cam","Deep-Live-Cam 是一款专注于实时换脸与视频生成的开源工具，用户仅需一张静态照片，即可通过“一键操作”实现摄像头画面的即时变脸或制作深度伪造视频。它有效解决了传统换脸技术流程繁琐、对硬件配置要求极高以及难以实时预览的痛点，让高质量的数字内容创作变得触手可及。\n\n这款工具不仅适合开发者和技术研究人员探索算法边界，更因其极简的操作逻辑（仅需三步：选脸、选摄像头、启动），广泛适用于普通用户、内容创作者、设计师及直播主播。无论是为了动画角色定制、服装展示模特替换，还是制作趣味短视频和直播互动，Deep-Live-Cam 都能提供流畅的支持。\n\n其核心技术亮点在于强大的实时处理能力，支持口型遮罩（Mouth Mask）以保留使用者原始的嘴部动作，确保表情自然精准；同时具备“人脸映射”功能，可同时对画面中的多个主体应用不同面孔。此外，项目内置了严格的内容安全过滤机制，自动拦截涉及裸露、暴力等不当素材，并倡导用户在获得授权及明确标注的前提下合规使用，体现了技术发展与伦理责任的平衡。",88924,"2026-04-06T03:28:53",[13,14,15,43],"视频",{"id":45,"name":46,"github_repo":47,"description_zh":48,"stars":49,"difficulty_score":23,"last_commit_at":50,"category_tags":51,"status":16},3704,"NextChat","ChatGPTNextWeb\u002FNextChat","NextChat 是一款轻量且极速的 AI 助手，旨在为用户提供流畅、跨平台的大模型交互体验。它完美解决了用户在多设备间切换时难以保持对话连续性，以及面对众多 AI 模型不知如何统一管理的痛点。无论是日常办公、学习辅助还是创意激发，NextChat 都能让用户随时随地通过网页、iOS、Android、Windows、MacOS 或 Linux 端无缝接入智能服务。\n\n这款工具非常适合普通用户、学生、职场人士以及需要私有化部署的企业团队使用。对于开发者而言，它也提供了便捷的自托管方案，支持一键部署到 Vercel 或 Zeabur 等平台。\n\nNextChat 的核心亮点在于其广泛的模型兼容性，原生支持 Claude、DeepSeek、GPT-4 及 Gemini Pro 等主流大模型，让用户在一个界面即可自由切换不同 AI 能力。此外，它还率先支持 MCP（Model Context Protocol）协议，增强了上下文处理能力。针对企业用户，NextChat 提供专业版解决方案，具备品牌定制、细粒度权限控制、内部知识库整合及安全审计等功能，满足公司对数据隐私和个性化管理的高标准要求。",87618,"2026-04-05T07:20:52",[13,26],{"id":53,"name":54,"github_repo":55,"description_zh":56,"stars":57,"difficulty_score":23,"last_commit_at":58,"category_tags":59,"status":16},2268,"ML-For-Beginners","microsoft\u002FML-For-Beginners","ML-For-Beginners 是由微软推出的一套系统化机器学习入门课程，旨在帮助零基础用户轻松掌握经典机器学习知识。这套课程将学习路径规划为 12 周，包含 26 节精炼课程和 52 道配套测验，内容涵盖从基础概念到实际应用的完整流程，有效解决了初学者面对庞大知识体系时无从下手、缺乏结构化指导的痛点。\n\n无论是希望转型的开发者、需要补充算法背景的研究人员，还是对人工智能充满好奇的普通爱好者，都能从中受益。课程不仅提供了清晰的理论讲解，还强调动手实践，让用户在循序渐进中建立扎实的技能基础。其独特的亮点在于强大的多语言支持，通过自动化机制提供了包括简体中文在内的 50 多种语言版本，极大地降低了全球不同背景用户的学习门槛。此外，项目采用开源协作模式，社区活跃且内容持续更新，确保学习者能获取前沿且准确的技术资讯。如果你正寻找一条清晰、友好且专业的机器学习入门之路，ML-For-Beginners 将是理想的起点。",84991,"2026-04-05T10:45:23",[14,60,43,61,15,62,26,13,63],"数据工具","插件","其他","音频",{"id":65,"github_repo":66,"name":67,"description_en":68,"description_zh":69,"ai_summary_zh":69,"readme_en":70,"readme_zh":71,"quickstart_zh":72,"use_case_zh":73,"hero_image_url":74,"owner_login":75,"owner_name":76,"owner_avatar_url":77,"owner_bio":78,"owner_company":79,"owner_location":79,"owner_email":80,"owner_twitter":79,"owner_website":81,"owner_url":82,"languages":83,"stars":88,"forks":89,"last_commit_at":90,"license":91,"difficulty_score":23,"env_os":92,"env_gpu":93,"env_ram":92,"env_deps":94,"category_tags":106,"github_topics":107,"view_count":23,"oss_zip_url":79,"oss_zip_packed_at":79,"status":16,"created_at":115,"updated_at":116,"faqs":117,"releases":145},4137,"infocusp\u002Ftf_cnnvis","tf_cnnvis","CNN visualization tool in TensorFlow","tf_cnnvis 是一款基于 TensorFlow 开发的卷积神经网络（CNN）可视化工具，旨在帮助开发者“透视”模型内部，直观理解深度学习网络是如何提取特征并做出判断的。它有效解决了 CNN 常被视为“黑盒”、内部运作机制难以解释的痛点，让抽象的神经元激活过程变得清晰可见。\n\n该工具主要面向 AI 研究人员、算法工程师及深度学习开发者，特别适合在模型调试、结构优化或学术研究中需要深入分析网络行为的场景。tf_cnnvis 集成了两种经典的可视化技术：一是依据 Zeiler 和 Fergus 的论文实现的特征重构技术，能够从网络任意层还原出输入图像的近似模样，展示不同层级关注的视觉细节；二是基于谷歌\"Deep Dream\"理念的生成技术，通过构造特定图像来最大化神经元的激活响应，从而揭示模型对特定类别的理解模式。所有生成的可视化结果均可直接在 TensorBoard 中查看，无缝融入现有的 TensorFlow 工作流，让用户无需编写复杂代码即可轻松探索模型奥秘。","# tf_cnnvis\n[![DOI](https:\u002F\u002Fzenodo.org\u002Fbadge\u002F85802370.svg)](https:\u002F\u002Fzenodo.org\u002Fbadge\u002Flatestdoi\u002F85802370)\n\nA blog post describing the library: https:\u002F\u002Fmedium.com\u002F@falaktheoptimist\u002Fwant-to-look-inside-your-cnn-we-have-just-the-right-tool-for-you-ad1e25b30d90 \n\ntf_cnnvis is a CNN visualization library which you can use to better understand your own CNNs. We use the [TensorFlow](https:\u002F\u002Fwww.tensorflow.org\u002F) library at the backend and the generated images are displayed in [TensorBoard](https:\u002F\u002Fwww.tensorflow.org\u002Fget_started\u002Fsummaries_and_tensorboard). We have implemented 2 CNN visualization techniques so far:\n\n1) Based on the paper [Visualizing and Understanding Convolutional Networks](https:\u002F\u002Fwww.cs.nyu.edu\u002F~fergus\u002Fpapers\u002FzeilerECCV2014.pdf) by Matthew D. Zeiler and Rob Fergus. The goal here is to reconstruct the input image from the information contained in any given layers of the convolutional neural network. Here are a few examples\n\n|   |   |   |   |\n| :-----------: | :-----------: | :-----------: | :-----------: |\n| \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Finfocusp_tf_cnnvis_readme_39ed2712d597.jpg\" width=\"196\" height=\"196\"> | \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Finfocusp_tf_cnnvis_readme_f158ece2dd06.png\" width=\"196\" height=\"196\"> | \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Finfocusp_tf_cnnvis_readme_90619bd67590.png\" width=\"196\" height=\"196\"> | \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Finfocusp_tf_cnnvis_readme_bed86fd914f2.png\" width=\"196\" height=\"196\"> |\n| \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Finfocusp_tf_cnnvis_readme_d42b9a7fc458.png\" width=\"196\" height=\"196\"> | \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Finfocusp_tf_cnnvis_readme_353010a941cc.png\" width=\"196\" height=\"196\"> | \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Finfocusp_tf_cnnvis_readme_5f36d65f8e7b.png\" width=\"196\" height=\"196\"> | \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Finfocusp_tf_cnnvis_readme_6aae6212de59.png\" width=\"196\" height=\"196\"> |\n| \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Finfocusp_tf_cnnvis_readme_463799d93ac4.png\" width=\"196\" height=\"196\"> | \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Finfocusp_tf_cnnvis_readme_3cf584795ca7.png\" width=\"196\" height=\"196\"> | \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Finfocusp_tf_cnnvis_readme_edbe50477fe3.png\" width=\"196\" height=\"196\"> | \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Finfocusp_tf_cnnvis_readme_69bd136ef74d.png\" width=\"196\" height=\"196\"> |\n\nFigure 1: Original image and the reconstructed versions from maxpool layer 1,2 and 3 of Alexnet generated using tf_cnnvis. \n\n2) CNN visualization based on [Deep dream](https:\u002F\u002Fgithub.com\u002Ftensorflow\u002Ftensorflow\u002Fblob\u002Fmaster\u002Ftensorflow\u002Fexamples\u002Ftutorials\u002Fdeepdream\u002Fdeepdream.ipynb) by Google. Here's the relevant [blog post](https:\u002F\u002Fresearch.googleblog.com\u002F2015\u002F06\u002Finceptionism-going-deeper-into-neural.html) explaining the technique. In essence, it attempts to construct an input image that maximizes the activation for a given output. We present some samples below:  \n\n|   |   |   |   |\n| :-----------: | :-----------: | :-----------: | :-----------: |\n| \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Finfocusp_tf_cnnvis_readme_c718eb9ca776.png\" width=\"196\" height=\"196\"> | \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Finfocusp_tf_cnnvis_readme_711aba0bfce8.png\" width=\"196\" height=\"196\"> | \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Finfocusp_tf_cnnvis_readme_1dc91b3af673.png\" width=\"196\" height=\"196\"> | \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Finfocusp_tf_cnnvis_readme_429150ee8df6.png\" width=\"196\" height=\"196\"> |\n| Carbonara | Ibex | Elephant | Ostrich |\n| \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Finfocusp_tf_cnnvis_readme_aea303723ff6.png\" width=\"196\" height=\"196\"> | \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Finfocusp_tf_cnnvis_readme_d23ebfb95ce1.png\" width=\"196\" height=\"196\"> | \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Finfocusp_tf_cnnvis_readme_ba036761f0b5.png\" width=\"196\" height=\"196\"> | \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Finfocusp_tf_cnnvis_readme_97086c4e43c4.png\" width=\"196\" height=\"196\"> |\n| Cheese burger | Tennis ball | Fountain pen | Clock tower |\n| \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Finfocusp_tf_cnnvis_readme_15f6edf0e354.png\" width=\"196\" height=\"196\"> | \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Finfocusp_tf_cnnvis_readme_46e77c2762fb.png\" width=\"196\" height=\"196\"> | \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Finfocusp_tf_cnnvis_readme_1c09360406f6.png\" width=\"196\" height=\"196\"> | \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Finfocusp_tf_cnnvis_readme_475f1876a05c.png\" width=\"196\" height=\"196\"> |\n| Cauliflower | Baby Milk bottle | Sea lion | Dolphin |\n\n## Requirements:\n* Tensorflow (>= 1.8)\n* numpy\n* scipy\n* h5py\n* wget\n* Pillow\n* six\n* scikit-image\n\nIf you are using pip you can install these with\n\n```pip install tensorflow numpy scipy h5py wget Pillow six scikit-image```\n\n## Setup script\nClone the repository\n\n```\n#!bash\n\ngit clone https:\u002F\u002Fgithub.com\u002FInFoCusp\u002Ftf_cnnvis.git\n```\n\nAnd run \n\n```\n#!bash\nsudo pip install setuptools\nsudo pip install six\nsudo python setup.py install\nsudo python setup.py clean\n```\n\n### Citation\nIf you use this library in your work, please cite \n```\n  @misc{tf_cnnvis,\n    author = {Bhagyesh Vikani, Falak Shah},\n    title = {CNN Visualization},\n    year = {2017},\n    howpublished = {\\url{https:\u002F\u002Fgithub.com\u002FInFoCusp\u002Ftf_cnnvis\u002F}},\n    doi = {10.5281\u002Fzenodo.2594491}\n  }\n```\n\n## API\n**tf_cnnvis.activation_visualization(graph_or_path, value_feed_dict, input_tensor=None, layers='r', path_logdir='.\u002FLog', path_outdir='.\u002FOutput')** \n\nThe function to generate the activation visualizations of the input image at the given layer.\n#### Parameters\n* graph_or_path (tf.Graph object or String) – TF graph or [Path-to-saved-graph] as String containing the CNN.\n* value_feed_dict (dict) – Values of placeholders to feed while evaluating the graph\n    * dict : {placeholder1 : value1, ...}\n\n* input_tensor (tf.tensor object (Default = None)) – tf.tensor (input tensor to the model - where images enter into the models) Note: This is not a standalone tensor\u002Fplaceholder separate from the model\n* layers (list or String (Default = 'r')) – \n    * layerName : Reconstruction from a layer specified by name \n    * ‘r’ : Reconstruction from all the relu layers \n    * ‘p’ : Reconstruction from all the pooling layers \n    * ‘c’ : Reconstruction from all the convolutional layers\n* path_outdir (String (Default = \".\u002FOutput\")) – [path-to-dir] to save results into disk as images\n* path_logdir (String (Default = \".\u002FLog\")) – [path-to-log-dir] to make log file for TensorBoard visualization\n\n#### Returns\n* is_success (boolean) – True if the function ran successfully. False otherwise\n\n**tf_cnnvis.deconv_visualization(graph_or_path, value_feed_dict, input_tensor=None, layers='r', path_logdir='.\u002FLog', path_outdir='.\u002FOutput')** \n\nThe function to generate the visualizations of the input image reconstructed from the feature maps of a given layer.\n#### Parameters\n* graph_or_path (tf.Graph object or String) – TF graph or [Path-to-saved-graph] as String containing the CNN.\n* value_feed_dict (dict) – Values of placeholders to feed while evaluating the graph\n    * dict : {placeholder1 : value1, ...}\n\n* input_tensor (tf.tensor object (Default = None)) – tf.tensor (input tensor to the model - where images enter into the models) Note: This is not a standalone tensor\u002Fplaceholder separate from the model\n* layers (list or String (Default = 'r')) – \n    * layerName : Reconstruction from a layer specified by name \n    * ‘r’ : Reconstruction from all the relu layers \n    * ‘p’ : Reconstruction from all the pooling layers \n    * ‘c’ : Reconstruction from all the convolutional layers\n* path_outdir (String (Default = \".\u002FOutput\")) – [path-to-dir] to save results into disk as images\n* path_logdir (String (Default = \".\u002FLog\")) – [path-to-log-dir] to make log file for TensorBoard visualization\n\n#### Returns\n* is_success (boolean) – True if the function ran successfully. False otherwise\n\n**tf_cnnvis.deepdream_visualization(graph_or_path, value_feed_dict, layer, classes, input_tensor=None, path_logdir='.\u002FLog', path_outdir='.\u002FOutput')** \n\nThe function to generate the visualizations of the input image reconstructed from the feature maps of a given layer.\n#### Parameters\n* graph_or_path (tf.Graph object or String) – TF graph or [Path-to-saved-graph] as String containing the CNN.\n* value_feed_dict (dict) – Values of placeholders to feed while evaluating the graph\n    * dict : {placeholder1 : value1, ...}\n\n* layer (String) - name of a layer in TF graph\n* classes (List) - list featuremap index for the class classification layer\n* input_tensor (tf.tensor object (Default = None)) – tf.tensor (input tensor to the model - where images enter into the models) Note: This is not a standalone tensor\u002Fplaceholder separate from the model\n* path_outdir (String (Default = \".\u002FOutput\")) – [path-to-dir] to save results into disk as images\n* path_logdir (String (Default = \".\u002FLog\")) – [path-to-log-dir] to make log file for TensorBoard visualization\n\n#### Returns\n* is_success (boolean) – True if the function ran successfully. False otherwise\n\n## To visualize in TensorBoard\nTo start Tensorflow, run the following command on the console\n\n```\n#!bash\n\ntensorboard --logdir=.\u002FLog\n```\n\nand on the TensorBoard homepage look under the *Images* tab\n\n## Additional helper functions\n### tf_cnnvis.utils.image_normalization(image, ubound=255.0, epsilon=1e-07)\nPerforms Min-Max image normalization. Transforms the pixel intensity values to range [0, ubound]\n#### Parameters\n* image (3-D numpy array) – A numpy array to normalize\n* ubound (float (Default = 255.0)) – upperbound for a image pixel value\n\n#### Returns\n* norm_image (3-D numpy array) – The normalized image\n\n### tf_cnnvis.utils.convert_into_grid(Xs, padding=1, ubound=255.0)\nConvert 4-D numpy array into a grid of images for display\n#### Parameters\n* Xs (4-D numpy array (first axis contations an image)) – The 4D array of images to put onto grid\n* padding (int (Default = 1)) – Spacing between grid cells\n* ubound (float (Default = 255.0)) – upperbound for a image pixel value\n\n#### Returns\n* (3-D numpy array) – A grid of input images\n\n\n","# tf_cnnvis\n[![DOI](https:\u002F\u002Fzenodo.org\u002Fbadge\u002F85802370.svg)](https:\u002F\u002Fzenodo.org\u002Fbadge\u002Flatestdoi\u002F85802370)\n\n介绍该库的博客文章：https:\u002F\u002Fmedium.com\u002F@falaktheoptimist\u002Fwant-to-look-inside-your-cnn-we-have-just-the-right-tool-for-you-ad1e25b30d90\n\ntf_cnnvis 是一个用于卷积神经网络可视化的库，可以帮助您更好地理解自己的 CNN 模型。它以 [TensorFlow](https:\u002F\u002Fwww.tensorflow.org\u002F) 作为后端，并将生成的可视化图像展示在 [TensorBoard](https:\u002F\u002Fwww.tensorflow.org\u002Fget_started\u002Fsummaries_and_tensorboard) 中。目前我们实现了两种 CNN 可视化技术：\n\n1) 基于 Matthew D. Zeiler 和 Rob Fergus 的论文《Visualizing and Understanding Convolutional Networks》（https:\u002F\u002Fwww.cs.nyu.edu\u002F~fergus\u002Fpapers\u002FzeilerECCV2014.pdf）。其目标是从卷积神经网络中任意一层所包含的信息重建输入图像。以下是一些示例：\n\n|   |   |   |   |\n| :-----------: | :-----------: | :-----------: | :-----------: |\n| \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Finfocusp_tf_cnnvis_readme_39ed2712d597.jpg\" width=\"196\" height=\"196\"> | \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Finfocusp_tf_cnnvis_readme_f158ece2dd06.png\" width=\"196\" height=\"196\"> | \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Finfocusp_tf_cnnvis_readme_90619bd67590.png\" width=\"196\" height=\"196\"> | \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Finfocusp_tf_cnnvis_readme_bed86fd914f2.png\" width=\"196\" height=\"196\"> |\n| \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Finfocusp_tf_cnnvis_readme_d42b9a7fc458.png\" width=\"196\" height=\"196\"> | \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Finfocusp_tf_cnnvis_readme_353010a941cc.png\" width=\"196\" height=\"196\"> | \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Finfocusp_tf_cnnvis_readme_5f36d65f8e7b.png\" width=\"196\" height=\"196\"> | \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Finfocusp_tf_cnnvis_readme_6aae6212de59.png\" width=\"196\" height=\"196\"> |\n| \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Finfocusp_tf_cnnvis_readme_463799d93ac4.png\" width=\"196\" height=\"196\"> | \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Finfocusp_tf_cnnvis_readme_3cf584795ca7.png\" width=\"196\" height=\"196\"> | \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Finfocusp_tf_cnnvis_readme_edbe50477fe3.png\" width=\"196\" height=\"196\"> | \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Finfocusp_tf_cnnvis_readme_69bd136ef74d.png\" width=\"196\" height=\"196\"> |\n\n图 1：原始图像以及使用 tf_cnnvis 从 AlexNet 的第 1、2 和 3 层最大池化层重建的版本。\n\n2) 基于 Google 的 [Deep Dream](https:\u002F\u002Fgithub.com\u002Ftensorflow\u002Ftensorflow\u002Fblob\u002Fmaster\u002Ftensorflow\u002Fexamples\u002Ftutorials\u002Fdeepdream\u002Fdeepdream.ipynb) 技术的 CNN 可视化。相关博客文章请参阅：https:\u002F\u002Fresearch.googleblog.com\u002F2015\u002F06\u002Finceptionism-going-deeper-into-neural.html。其核心思想是构造一张能够最大化特定输出激活值的输入图像。以下是一些示例：\n\n|   |   |   |   |\n| :-----------: | :-----------: | :-----------: | :-----------: |\n| \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Finfocusp_tf_cnnvis_readme_c718eb9ca776.png\" width=\"196\" height=\"196\"> | \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Finfocusp_tf_cnnvis_readme_711aba0bfce8.png\" width=\"196\" height=\"196\"> | \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Finfocusp_tf_cnnvis_readme_1dc91b3af673.png\" width=\"196\" height=\"196\"> | \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Finfocusp_tf_cnnvis_readme_429150ee8df6.png\" width=\"196\" height=\"196\"> |\n| 卡邦纳意面 | 雪山羊 | 大象 | 鸵鸟 |\n| \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Finfocusp_tf_cnnvis_readme_aea303723ff6.png\" width=\"196\" height=\"196\"> | \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Finfocusp_tf_cnnvis_readme_d23ebfb95ce1.png\" width=\"196\" height=\"196\"> | \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Finfocusp_tf_cnnvis_readme_ba036761f0b5.png\" width=\"196\" height=\"196\"> | \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Finfocusp_tf_cnnvis_readme_97086c4e43c4.png\" width=\"196\" height=\"196\"> |\n| 奶酪汉堡 | 网球 | 钢笔 | 钟楼 |\n| \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Finfocusp_tf_cnnvis_readme_15f6edf0e354.png\" width=\"196\" height=\"196\"> | \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Finfocusp_tf_cnnvis_readme_46e77c2762fb.png\" width=\"196\" height=\"196\"> | \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Finfocusp_tf_cnnvis_readme_1c09360406f6.png\" width=\"196\" height=\"196\"> | \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Finfocusp_tf_cnnvis_readme_475f1876a05c.png\" width=\"196\" height=\"196\"> |\n| 花椰菜 | 婴儿奶瓶 | 海狮 | 海豚 |\n\n## 系统要求：\n* TensorFlow (>= 1.8)\n* numpy\n* scipy\n* h5py\n* wget\n* Pillow\n* six\n* scikit-image\n\n如果您使用 pip 安装，可以运行以下命令：\n\n```pip install tensorflow numpy scipy h5py wget Pillow six scikit-image```\n\n## 安装步骤\n克隆仓库：\n\n```\n#!bash\n\ngit clone https:\u002F\u002Fgithub.com\u002FInFoCusp\u002Ftf_cnnvis.git\n```\n\n然后执行：\n\n```\n#!bash\nsudo pip install setuptools\nsudo pip install six\nsudo python setup.py install\nsudo python setup.py clean\n```\n\n### 引用信息\n如果您在工作中使用了本库，请引用以下内容：\n\n```\n  @misc{tf_cnnvis,\n    author = {Bhagyesh Vikani, Falak Shah},\n    title = {CNN Visualization},\n    year = {2017},\n    howpublished = {\\url{https:\u002F\u002Fgithub.com\u002FInFoCusp\u002Ftf_cnnvis\u002F}},\n    doi = {10.5281\u002Fzenodo.2594491}\n  }\n```\n\n## API\n**tf_cnnvis.activation_visualization(graph_or_path, value_feed_dict, input_tensor=None, layers='r', path_logdir='.\u002FLog', path_outdir='.\u002FOutput')**\n\n用于在给定层生成输入图像的激活可视化效果的函数。\n#### 参数\n* graph_or_path (tf.Graph 对象或字符串) – 包含 CNN 的 TF 图或保存图的路径字符串。\n* value_feed_dict (字典) – 在评估图时需要喂入占位符的值\n    * 字典 : {placeholder1 : value1, ...}\n\n* input_tensor (tf.tensor 对象 (默认 = None)) – tf.tensor（模型的输入张量，即图像进入模型的地方）注意：这不是与模型分离的独立张量或占位符。\n* layers (列表或字符串 (默认 = 'r')) – \n    * layerName : 从指定名称的层进行重建\n    * ‘r’ : 从所有 ReLU 层进行重建\n    * ‘p’ : 从所有池化层进行重建\n    * ‘c’ : 从所有卷积层进行重建\n* path_outdir (字符串 (默认 = \".\u002FOutput\")) – 用于将结果以图像形式保存到磁盘的目录路径。\n* path_logdir (字符串 (默认 = \".\u002FLog\")) – 用于为 TensorBoard 可视化生成日志文件的日志目录路径。\n\n#### 返回值\n* is_success (布尔值) – 如果函数成功运行则返回 True，否则返回 False。\n\n**tf_cnnvis.deconv_visualization(graph_or_path, value_feed_dict, input_tensor=None, layers='r', path_logdir='.\u002FLog', path_outdir='.\u002FOutput')**\n\n用于从给定层的特征图重建输入图像并生成可视化的函数。\n#### 参数\n* graph_or_path (tf.Graph 对象或字符串) – 包含 CNN 的 TF 图或保存图的路径字符串。\n* value_feed_dict (字典) – 在评估图时需要喂入占位符的值\n    * 字典 : {placeholder1 : value1, ...}\n\n* input_tensor (tf.tensor 对象 (默认 = None)) – tf.tensor（模型的输入张量，即图像进入模型的地方）注意：这不是与模型分离的独立张量或占位符。\n* layers (列表或字符串 (默认 = 'r')) – \n    * layerName : 从指定名称的层进行重建\n    * ‘r’ : 从所有 ReLU 层进行重建\n    * ‘p’ : 从所有池化层进行重建\n    * ‘c’ : 从所有卷积层进行重建\n* path_outdir (字符串 (默认 = \".\u002FOutput\")) – 用于将结果以图像形式保存到磁盘的目录路径。\n* path_logdir (字符串 (默认 = \".\u002FLog\")) – 用于为 TensorBoard 可视化生成日志文件的日志目录路径。\n\n#### 返回值\n* is_success (布尔值) – 如果函数成功运行则返回 True，否则返回 False。\n\n**tf_cnnvis.deepdream_visualization(graph_or_path, value_feed_dict, layer, classes, input_tensor=None, path_logdir='.\u002FLog', path_outdir='.\u002FOutput')**\n\n用于从给定层的特征图重建输入图像并生成可视化的函数。\n#### 参数\n* graph_or_path (tf.Graph 对象或字符串) – 包含 CNN 的 TF 图或保存图的路径字符串。\n* value_feed_dict (字典) – 在评估图时需要喂入占位符的值\n    * 字典 : {placeholder1 : value1, ...}\n\n* layer (字符串) - TF 图中某一层的名称。\n* classes (列表) - 用于分类层的特征图索引列表。\n* input_tensor (tf.tensor 对象 (默认 = None)) – tf.tensor（模型的输入张量，即图像进入模型的地方）注意：这不是与模型分离的独立张量或占位符。\n* path_outdir (字符串 (默认 = \".\u002FOutput\")) – 用于将结果以图像形式保存到磁盘的目录路径。\n* path_logdir (字符串 (默认 = \".\u002FLog\")) – 用于为 TensorBoard 可视化生成日志文件的日志目录路径。\n\n#### 返回值\n* is_success (布尔值) – 如果函数成功运行则返回 True，否则返回 False。\n\n## 在 TensorBoard 中进行可视化\n要启动 TensorFlow，可在控制台中运行以下命令：\n\n```\n#!bash\n\ntensorboard --logdir=.\u002FLog\n```\n\n然后在 TensorBoard 主页的 *Images* 选项卡下查看。\n\n## 其他辅助函数\n### tf_cnnvis.utils.image_normalization(image, ubound=255.0, epsilon=1e-07)\n执行最小-最大图像归一化。将像素强度值转换到 [0, ubound] 范围内。\n#### 参数\n* image (3D NumPy 数组) – 需要归一化的 NumPy 数组。\n* ubound (浮点数 (默认 = 255.0)) – 图像像素值的上限。\n\n#### 返回值\n* norm_image (3D NumPy 数组) – 归一化后的图像。\n\n### tf_cnnvis.utils.convert_into_grid(Xs, padding=1, ubound=255.0)\n将 4D NumPy 数组转换为可用于显示的图像网格。\n#### 参数\n* Xs (4D NumPy 数组 (第一轴包含图像)) – 需要放置到网格上的 4D 图像数组。\n* padding (整数 (默认 = 1)) – 网格单元之间的间距。\n* ubound (浮点数 (默认 = 255.0)) – 图像像素值的上限。\n\n#### 返回值\n* (3D NumPy 数组) – 输入图像组成的网格。","# tf_cnnvis 快速上手指南\n\ntf_cnnvis 是一个基于 TensorFlow 的卷积神经网络（CNN）可视化库，旨在帮助开发者深入理解 CNN 的内部工作机制。它支持两种核心可视化技术：基于 Zeiler & Fergus 论文的特征重构（反卷积网络）和基于 Google DeepDream 的激活最大化生成。生成的图像可直接在 TensorBoard 中查看。\n\n## 环境准备\n\n在开始之前，请确保您的系统满足以下要求：\n\n*   **Python 版本**：建议 Python 3.x\n*   **TensorFlow**：版本 >= 1.8\n*   **其他依赖库**：numpy, scipy, h5py, wget, Pillow, six, scikit-image\n\n### 安装依赖\n\n您可以使用 pip 一键安装所有必要的依赖包。国内用户推荐使用清华或阿里镜像源以加速下载：\n\n```bash\npip install -i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple tensorflow numpy scipy h5py wget Pillow six scikit-image\n```\n\n## 安装步骤\n\n1.  **克隆仓库**\n    从 GitHub 获取源代码：\n\n    ```bash\n    git clone https:\u002F\u002Fgithub.com\u002FInFoCusp\u002Ftf_cnnvis.git\n    cd tf_cnnvis\n    ```\n\n2.  **执行安装脚本**\n    运行 setup 脚本完成库的安装：\n\n    ```bash\n    sudo pip install setuptools\n    sudo pip install six\n    sudo python setup.py install\n    sudo python setup.py clean\n    ```\n\n## 基本使用\n\ntf_cnnvis 提供了三个主要的可视化函数，分别对应不同的可视化策略。以下是基于 Python 的最简使用示例。\n\n### 1. 激活可视化 (Activation Visualization)\n用于生成输入图像在指定层的激活图，帮助理解网络关注的位置。\n\n```python\nimport tf_cnnvis\n\n# 参数说明:\n# graph_or_path: TensorFlow 图对象或保存的图路径\n# value_feed_dict: 占位符的输入值字典，例如 {input_placeholder: image_data}\n# layers: 'r' (所有 ReLU 层), 'p' (所有池化层), 'c' (所有卷积层) 或特定层名列表\n\nsuccess = tf_cnnvis.activation_visualization(\n    graph_or_path=\"path_to_your_graph.pb\", \n    value_feed_dict={input_placeholder: your_image_array}, \n    layers='r', \n    path_logdir='.\u002FLog', \n    path_outdir='.\u002FOutput'\n)\n\nif success:\n    print(\"激活可视化生成成功\")\n```\n\n### 2. 反卷积可视化 (Deconv Visualization)\n基于反卷积网络，尝试从特定层的特征图中重构输入图像，展示该层提取的特征模式。\n\n```python\nimport tf_cnnvis\n\nsuccess = tf_cnnvis.deconv_visualization(\n    graph_or_path=\"path_to_your_graph.pb\", \n    value_feed_dict={input_placeholder: your_image_array}, \n    layers='p',  # 例如从池化层重构\n    path_logdir='.\u002FLog', \n    path_outdir='.\u002FOutput'\n)\n\nif success:\n    print(\"反卷积可视化生成成功\")\n```\n\n### 3. DeepDream 可视化\n生成能够最大化特定神经元激活的输入图像，常用于观察网络学到的抽象概念（如“意大利面”、“鸟”等）。\n\n```python\nimport tf_cnnvis\n\n# classes: 需要最大化的类别对应的特征图索引列表\nsuccess = tf_cnnvis.deepdream_visualization(\n    graph_or_path=\"path_to_your_graph.pb\", \n    value_feed_dict={input_placeholder: your_image_array}, \n    layer=\"mixed4c\",  # 目标层名称\n    classes=[100],    # 目标类别索引\n    path_logdir='.\u002FLog', \n    path_outdir='.\u002FOutput'\n)\n\nif success:\n    print(\"DeepDream 可视化生成成功\")\n```\n\n### 查看结果\n\n所有生成的图像日志默认保存在 `.\u002FLog` 目录。启动 TensorBoard 即可在浏览器中查看可视化结果：\n\n```bash\ntensorboard --logdir=.\u002FLog\n```\n\n启动后，在浏览器打开提示的地址，点击顶部的 **Images** 标签页即可查看生成的可视化图像。","某医疗影像算法团队正在训练一个基于 CNN 的肺部结节检测模型，试图提升早期癌症筛查的准确率，但模型在验证集上出现了难以解释的误判。\n\n### 没有 tf_cnnvis 时\n- 开发人员只能盲目调整网络层数或超参数，完全依靠“猜”来定位是浅层特征提取不足还是深层语义理解偏差。\n- 面对模型将良性钙化点误判为恶性肿瘤的情况，无法直观看到模型到底关注了图像的哪些纹理或边缘，缺乏可解释性证据。\n- 调试过程如同“黑盒”操作，团队难以向医学专家证明模型的判断逻辑，导致跨部门协作受阻，项目进度停滞。\n- 尝试复现论文中的可视化效果需要手动编写大量复杂的 TensorFlow 反向传播代码，耗时且容易出错。\n\n### 使用 tf_cnnvis 后\n- 利用基于 Zeiler & Fergus 论文的重建技术，团队直接通过 TensorBoard 看到了各卷积层还原的图像，迅速发现第三层池化后丢失了关键微小结节边缘。\n- 借助 Deep Dream 生成最大化激活的图像，清晰展示出模型误判是因为过度关注了类似血管的非特异性纹理，从而针对性地增加了数据增强策略。\n- 生成的可视化图表成为与医生沟通的桥梁，直观展示了模型“看”到的病灶特征，成功获得了医学专家的信任与反馈。\n- 无需重复造轮子，仅需几行代码即可调用成熟的可视化方案，将原本需要数天的调试分析工作缩短至几小时。\n\ntf_cnnvis 通过将抽象的神经网络内部运作转化为可视化的图像证据，让深度学习模型从不可知的“黑盒”变成了可诊断、可优化的透明系统。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Finfocusp_tf_cnnvis_40693984.png","infocusp","Infocusp","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Finfocusp_9d344c2f.jpg","",null,"info@infocusp.com","https:\u002F\u002Fwww.infocusp.com\u002F","https:\u002F\u002Fgithub.com\u002Finfocusp",[84],{"name":85,"color":86,"percentage":87},"Python","#3572A5",100,779,210,"2025-12-04T17:17:45","MIT","未说明","未说明 (基于 TensorFlow 后端，通常建议使用支持 CUDA 的 NVIDIA GPU 以加速计算，但 README 未明确指定型号或显存要求)",{"notes":95,"python":96,"dependencies":97},"该工具依赖较旧版本的 TensorFlow (>=1.8)，在现代环境中安装可能遇到兼容性问题。可视化结果需通过 TensorBoard 查看（运行 'tensorboard --logdir=.\u002FLog'）。安装过程需要使用 sudo 权限执行 setup.py 脚本。","未说明 (根据 TensorFlow >= 1.8 推断，通常兼容 Python 2.7 或 3.5+)",[98,99,100,101,102,103,104,105],"tensorflow>=1.8","numpy","scipy","h5py","wget","Pillow","six","scikit-image",[13],[108,109,110,111,112,113,114],"tensorflow","tensorboard","convolutional-neural-networks","cnn","visualization","deepdream","convolutional-networks","2026-03-27T02:49:30.150509","2026-04-06T12:04:04.434645",[118,123,128,133,137,141],{"id":119,"question_zh":120,"answer_zh":121,"source_url":122},18845,"使用 deconv_visualization 时遇到 'Fetch argument None has invalid type' 错误怎么办？","该错误通常是因为未正确指定输入张量（input_tensor）或重建张量。请检查您的代码，确保在调用函数时传入了正确的 input_tensor 参数。如果您使用的是 Estimator API 创建的模型（非冻结图），需要手动定义占位符并加载 .meta 文件。示例代码如下：\n1. 重置默认图：tf.reset_default_graph()\n2. 创建会话和占位符：self.input_placeholder = tf.placeholder(tf.float32, shape=[1, height, width, channels])\n3. 导入元图并恢复权重：saver = tf.train.import_meta_graph(model_file); saver.restore(session, checkpoint_path)\n4. 调用可视化函数时传入 input_tensor=self.input_placeholder。","https:\u002F\u002Fgithub.com\u002Finfocusp\u002Ftf_cnnvis\u002Fissues\u002F12",{"id":124,"question_zh":125,"answer_zh":126,"source_url":127},18846,"对象检测模型（如 Faster R-CNN）无法使用 deconv_visualization 怎么办？","对象检测网络（如 Faster R-CNN ResNet101）的结构可能不直接支持默认的 deconv_visualization，但 activation_visualization 通常可以正常工作。如果必须使用反卷积可视化，建议尝试针对特定架构（如 MobileNetV2+SSD）调整代码。对于冻结图（.pb 文件），需先导入图定义并正确映射输入节点。示例代码片段：\nwith tf.gfile.FastGFile('frozen.pb', 'rb') as f:\n    graph_def = tf.GraphDef()\n    graph_def.ParseFromString(f.read())\n    t_input = tf.placeholder(np.float32, name='FeatureExtractor\u002FMobilenetV2\u002FMobilenetV2\u002Finput')\n    tf.import_graph_def(graph_def, {'FeatureExtractor\u002FMobilenetV2\u002FMobilenetV2\u002Finput': t_input})\n然后调用 deconv_visualization(sess_graph_path=tf.get_default_graph(), value_feed_dict={t_input: processed_image}, layers=['r', 'p', 'c'])。","https:\u002F\u002Fgithub.com\u002Finfocusp\u002Ftf_cnnvis\u002Fissues\u002F59",{"id":129,"question_zh":130,"answer_zh":131,"source_url":132},18847,"运行 deepdream_visualization 时报 'invalid reduction dimension' 错误如何解决？","此问题是由 NumPy 版本兼容性引起的。当 NumPy 版本低于 1.12 时，np.roll 函数的参数行为不同，导致报错。解决方案是更新 tf_cnnvis 库以支持向后兼容，或者升级 NumPy 到 1.12 及以上版本。执行以下命令更新库：\ngit pull tf_cnnvis\n然后重新安装或设置环境。维护者已修复此问题以兼容旧版 NumPy。","https:\u002F\u002Fgithub.com\u002Finfocusp\u002Ftf_cnnvis\u002Fissues\u002F15",{"id":134,"question_zh":135,"answer_zh":136,"source_url":122},18848,"如何为通过 Estimator API 保存的模型（.meta, .index 文件）配置可视化输入？","对于非冻结的 Estimator 模型，不能直接使用默认图。您需要在类构造函数中手动重置图、创建会话、定义与模型输入形状匹配的占位符，然后加载 .meta 图。具体步骤：\n1. tf.reset_default_graph()\n2. self.session = tf.Session()\n3. 定义占位符（例如）：self.input_placeholder = tf.placeholder(tf.float32, shape=[1, 864, 480, 3])\n4. 加载模型：saver = tf.train.import_meta_graph(vad_model_file_name); saver.restore(self.session, tf.train.latest_checkpoint(vad_model_dir))\n5. 在调用可视化函数时，将 input_tensor 参数设置为刚才定义的 self.input_placeholder。",{"id":138,"question_zh":139,"answer_zh":140,"source_url":127},18849,"在使用 MobileNetV2 + SSD 进行反卷积可视化时，如何预处理输入图像？","针对 MobileNetV2 + SSD 模型，输入图像需要进行特定的归一化处理。参考代码如下：\n1. 读取并调整图像大小：im = np.expand_dims(imresize(imread('image.jpg'), (300, 300)), axis=0)\n2. 应用均值和偏差：mean = 2\u002F255.0, dev = 1.0\n3. 计算处理后的图像：im_processed = im * mean - dev\n4. 将 im_processed 放入 value_feed_dict 中传递给 deconv_visualization 函数。",{"id":142,"question_zh":143,"answer_zh":144,"source_url":122},18850,"deconv_visualization 中的 'softmax tensor' 指的是什么？","在上下文中，'softmax tensor' 通常指模型输出层经过 Softmax 激活函数后的张量，代表分类概率。如果在可视化过程中遇到相关错误，除了检查 softmax 张量外，还务必检查重建张量（reconstruction tensor）是否正确连接。确保在 value_feed_dict 中提供的键值对与图中占位符名称完全匹配，并且输入张量（input_tensor）指向正确的输入节点。",[146,151,156],{"id":147,"version":148,"summary_zh":149,"released_at":150},109364,"leviosa","我们比主分支落后了几 commits。也在修复这个问题。","2019-03-15T07:51:29",{"id":152,"version":153,"summary_zh":154,"released_at":155},109365,"v1.1.0","## 新增内容\n* 重大 bug 修复\n* 添加了对冻结图的检查\n* 输出文件夹结构更整洁\n* Deep Dream 现在支持单通道输入\n* 更通用的 setup.py\n* 示例代码已更新\n\n## 感谢我们的贡献者：\n@csggnn , @b8horpet, @SebastienDebia , @javiribera @BhagyeshVikani @falaktheoptimist","2018-02-02T14:48:40",{"id":157,"version":158,"summary_zh":159,"released_at":160},109366,"v1.0.0","支持的卷积神经网络可视化技术：\n\n1. 基于Matthew D. Zeiler和Rob Fergus发表的论文《可视化与理解卷积网络》（[Visualizing and Understanding Convolutional Networks](https:\u002F\u002Fwww.cs.nyu.edu\u002F~fergus\u002Fpapers\u002FzeilerECCV2014.pdf)）。其目标是从卷积神经网络中任意一层所包含的信息重建输入图像。\n2. 基于[Deep Dream](https:\u002F\u002Fgithub.com\u002Ftensorflow\u002Ftensorflow\u002Fblob\u002Fmaster\u002Ftensorflow\u002Fexamples\u002Ftutorials\u002Fdeepdream\u002Fdeepdream.ipynb)的CNN可视化。相关技术说明请参阅[这篇博客文章](https:\u002F\u002Fresearch.googleblog.com\u002F2015\u002F06\u002Finceptionism-going-deeper-into-neural.html)。本质上，该方法试图构造一张能够最大化给定输出激活值的输入图像。","2017-04-18T06:29:55"]