[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-microsoft--MMdnn":3,"tool-microsoft--MMdnn":64},[4,17,27,35,43,56],{"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 真正成长为懂上",138956,2,"2026-04-05T11:33:21",[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":23,"last_commit_at":41,"category_tags":42,"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":44,"name":45,"github_repo":46,"description_zh":47,"stars":48,"difficulty_score":23,"last_commit_at":49,"category_tags":50,"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,51,52,53,15,54,26,13,55],"数据工具","视频","插件","其他","音频",{"id":57,"name":58,"github_repo":59,"description_zh":60,"stars":61,"difficulty_score":10,"last_commit_at":62,"category_tags":63,"status":16},3128,"ragflow","infiniflow\u002Fragflow","RAGFlow 是一款领先的开源检索增强生成（RAG）引擎，旨在为大语言模型构建更精准、可靠的上下文层。它巧妙地将前沿的 RAG 技术与智能体（Agent）能力相结合，不仅支持从各类文档中高效提取知识，还能让模型基于这些知识进行逻辑推理和任务执行。\n\n在大模型应用中，幻觉问题和知识滞后是常见痛点。RAGFlow 通过深度解析复杂文档结构（如表格、图表及混合排版），显著提升了信息检索的准确度，从而有效减少模型“胡编乱造”的现象，确保回答既有据可依又具备时效性。其内置的智能体机制更进一步，使系统不仅能回答问题，还能自主规划步骤解决复杂问题。\n\n这款工具特别适合开发者、企业技术团队以及 AI 研究人员使用。无论是希望快速搭建私有知识库问答系统，还是致力于探索大模型在垂直领域落地的创新者，都能从中受益。RAGFlow 提供了可视化的工作流编排界面和灵活的 API 接口，既降低了非算法背景用户的上手门槛，也满足了专业开发者对系统深度定制的需求。作为基于 Apache 2.0 协议开源的项目，它正成为连接通用大模型与行业专有知识之间的重要桥梁。",77062,"2026-04-04T04:44:48",[15,14,13,26,54],{"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":81,"owner_website":82,"owner_url":83,"languages":84,"stars":109,"forks":110,"last_commit_at":111,"license":112,"difficulty_score":23,"env_os":113,"env_gpu":114,"env_ram":115,"env_deps":116,"category_tags":123,"github_topics":124,"view_count":23,"oss_zip_url":79,"oss_zip_packed_at":79,"status":16,"created_at":136,"updated_at":137,"faqs":138,"releases":169},3679,"microsoft\u002FMMdnn","MMdnn","MMdnn is a set of tools to help users inter-operate among different deep learning frameworks. E.g. model conversion and visualization. Convert models between Caffe, Keras, MXNet, Tensorflow, CNTK, PyTorch Onnx and CoreML.","MMdnn 是一款由微软开源的深度学习模型管理工具，旨在打破不同深度学习框架之间的壁垒。在人工智能领域，开发者常面临模型训练与部署环境不一致的难题，例如需要在 PyTorch 中训练却要在 TensorFlow 或移动端 CoreML 上运行。MMdnn 通过提供通用的模型转换器，轻松实现 Caffe、Keras、MXNet、TensorFlow、CNTK、PyTorch、ONNX 及 CoreML 等主流框架间的模型互转，让用户能够“一次训练，多处部署”。\n\n除了核心的格式转换功能，MMdnn 还具备模型可视化能力，能直观展示网络架构，辅助开发者诊断模型结构；同时它还能生成简化后的代码片段，方便后续的微调推理。针对部署环节，工具还提供了将模型迁移至 Android 平台或利用 TensorRT 加速推理的实用指南。\n\n这款工具非常适合 AI 算法工程师、研究人员以及需要跨平台交付模型的开发团队使用。无论你是希望复用现有模型资源，还是致力于优化端到端的部署流程，MMdnn 都能以简洁高效的方式提升你的工作效率，让深度学习模型的管理变得更加灵活自如。","# ![MMdnn](https:\u002F\u002Fndqzpq.dm2304.livefilestore.com\u002Fy4mF9ON1vKrSy0ew9dM3Fw6KAvLzQza2nL9JiMSIfgfKLbqJPvuxwOC2VIur_Ycz4TvVpkibMkvKXrX-N9QOkyh0AaUW4qhWDak8cyM0UoLLxc57apyhfDaxflLlZrGqiJgzn1ztsxiaZMzglaIMhoo8kjPuZ5-vY7yoWXqJuhC1BDHOwgNPwIgzpxV1H4k1oQzmewThpAJ_w_fUHzianZtMw?width=35&height=35&cropmode=none) MMdnn\n\n[![PyPi Version](https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fv\u002Fmmdnn.svg)](https:\u002F\u002Fpypi.org\u002Fproject\u002Fmmdnn\u002F)\n[![License](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flicense-MIT-blue.svg)](LICENSE)\n[![Linux](https:\u002F\u002Ftravis-ci.org\u002FMicrosoft\u002FMMdnn.svg?branch=master)](https:\u002F\u002Ftravis-ci.org\u002FMicrosoft\u002FMMdnn)\n\nMMdnn is a comprehensive and cross-framework tool to convert, visualize and diagnose deep learning (DL) models.\nThe \"MM\" stands for model management, and \"dnn\" is the acronym of deep neural network.\n\nMajor features include:\n\n- \u003Ca href=\"#conversion\">**Model Conversion**\u003C\u002Fa>\n\n  - We implement a universal converter to convert DL models between frameworks, which means you can train a model with one framework and deploy it with another.\n\n- **Model Retraining**\n\n  - During the model conversion, we generate some code snippets to simplify later retraining or inference.\n\n- **Model Search & Visualization**\n\n  - We provide a [model collection](mmdnn\u002Fmodels\u002FREADME.md) to help you find some popular models.\n  - We provide a \u003Ca href=\"#visualization\">model visualizer\u003C\u002Fa> to display the network architecture more intuitively.\n\n- **Model Deployment**\n\n  - We provide some guidelines to help you deploy DL models to another hardware platform.\n    - [Android](https:\u002F\u002Fgithub.com\u002FMicrosoft\u002FMMdnn\u002Fwiki\u002FDeploy-your-TensorFlow-Lite-Model-in-Android)\n    - [Serving](https:\u002F\u002Fgithub.com\u002FMicrosoft\u002FMMdnn\u002Fwiki\u002FTensorflow-Serving-Via-Docker)\n    \n  - We provide a guide to help you accelerate inference with TensorRT.\n    - [TensorRT](https:\u002F\u002Fgithub.com\u002FMicrosoft\u002FMMdnn\u002Fwiki\u002FUsing-TensorRT-to-Accelerate-Inference)\n  \n\n## Related Projects\n\nTargeting at openness and advancing state-of-art technology, [Microsoft Research (MSR)](https:\u002F\u002Fwww.microsoft.com\u002Fen-us\u002Fresearch\u002Fgroup\u002Fsystems-and-networking-research-group-asia\u002F) and [Microsoft Software Technology Center (STC)](https:\u002F\u002Fwww.microsoft.com\u002Fen-us\u002Fard\u002Fcompany\u002Fintroduction.aspx) had also released few other open source projects:\n\n* [OpenPAI](https:\u002F\u002Fgithub.com\u002FMicrosoft\u002Fpai) : an open source platform that provides complete AI model training and resource management capabilities, it is easy to extend and supports on-premise, cloud and hybrid environments in various scale.\n* [FrameworkController](https:\u002F\u002Fgithub.com\u002FMicrosoft\u002Fframeworkcontroller) : an open source general-purpose Kubernetes Pod Controller that orchestrate all kinds of applications on Kubernetes by a single controller.\n* [NNI](https:\u002F\u002Fgithub.com\u002FMicrosoft\u002Fnni) : a lightweight but powerful toolkit to help users automate Feature Engineering, Neural Architecture Search, Hyperparameter Tuning and Model Compression.\n* [NeuronBlocks](https:\u002F\u002Fgithub.com\u002FMicrosoft\u002FNeuronBlocks) : an NLP deep learning modeling toolkit that helps engineers to build DNN models like playing Lego. The main goal of this toolkit is to minimize developing cost for NLP deep neural network model building, including both training and inference stages.\n* [SPTAG](https:\u002F\u002Fgithub.com\u002FMicrosoft\u002FSPTAG) : Space Partition Tree And Graph (SPTAG) is an open source library for large scale vector approximate nearest neighbor search scenario.\n\nWe encourage researchers, developers and students to leverage these projects to boost their AI \u002F Deep Learning productivity.\n\n## Installation\n\n### Install manually\n\nYou can get a stable version of MMdnn by\n\n```bash\npip install mmdnn\n```\nAnd make sure to have [Python](https:\u002F\u002Fwww.python.org\u002F) installed\nor you can try the newest version by\n\n```bash\npip install -U git+https:\u002F\u002Fgithub.com\u002FMicrosoft\u002FMMdnn.git@master\n```\n\n### Install with docker image\n\nMMdnn provides a docker image, which packages MMdnn and Deep Learning frameworks that we support as well as other dependencies.\nYou can easily try the image with the following steps:\n\n1. Install Docker Community Edition(CE)\n\n    [_Learn more about how to install docker_](https:\u002F\u002Fgithub.com\u002FMicrosoft\u002FMMdnn\u002Fblob\u002Fmaster\u002Fdocs\u002FInstallDockerCE.md)\n\n1. Pull MMdnn docker image\n    ```bash\n    docker pull mmdnn\u002Fmmdnn:cpu.small\n    ```\n\n1. Run image in an interactive mode\n\n    ```bash\n    docker run -it mmdnn\u002Fmmdnn:cpu.small\n    ```\n\n## Features\n\n### \u003Ca name=\"conversion\">Model Conversion\u003C\u002Fa>\n\nAcross the industry and academia, there are a number of existing frameworks available for developers and researchers to design a model, where each framework has its own network structure definition and saving model format. The gaps between frameworks impede the inter-operation of the models.\n\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmicrosoft_MMdnn_readme_3069e386d1b5.jpg\" width=\"633\" >\n\nWe provide a model converter to help developers convert models between frameworks through an intermediate representation format.\n\n#### Support frameworks\n\n> [Note] You can click the links to get detailed README of each framework.\n\n- [Caffe](https:\u002F\u002Fgithub.com\u002FMicrosoft\u002FMMdnn\u002Fblob\u002Fmaster\u002Fmmdnn\u002Fconversion\u002Fcaffe\u002FREADME.md)\n- [Microsoft Cognitive Toolkit (CNTK)](https:\u002F\u002Fgithub.com\u002FMicrosoft\u002FMMdnn\u002Fblob\u002Fmaster\u002Fmmdnn\u002Fconversion\u002Fcntk\u002FREADME.md)\n- [CoreML](https:\u002F\u002Fgithub.com\u002FMicrosoft\u002FMMdnn\u002Fblob\u002Fmaster\u002Fmmdnn\u002Fconversion\u002Fcoreml\u002FREADME.md)\n- [Keras](https:\u002F\u002Fgithub.com\u002FMicrosoft\u002FMMdnn\u002Fblob\u002Fmaster\u002Fmmdnn\u002Fconversion\u002Fkeras\u002FREADME.md)\n- [MXNet](https:\u002F\u002Fgithub.com\u002FMicrosoft\u002FMMdnn\u002Fblob\u002Fmaster\u002Fmmdnn\u002Fconversion\u002Fmxnet\u002FREADME.md)\n- [ONNX](https:\u002F\u002Fgithub.com\u002FMicrosoft\u002FMMdnn\u002Fblob\u002Fmaster\u002Fmmdnn\u002Fconversion\u002Fonnx\u002FREADME.md) (Destination only)\n- [PyTorch](https:\u002F\u002Fgithub.com\u002FMicrosoft\u002FMMdnn\u002Fblob\u002Fmaster\u002Fmmdnn\u002Fconversion\u002Fpytorch\u002FREADME.md)\n- [TensorFlow](https:\u002F\u002Fgithub.com\u002FMicrosoft\u002FMMdnn\u002Fblob\u002Fmaster\u002Fmmdnn\u002Fconversion\u002Ftensorflow\u002FREADME.md) (Experimental) (We highly recommend you read the README of TensorFlow first)\n- [DarkNet](https:\u002F\u002Fgithub.com\u002FMicrosoft\u002FMMdnn\u002Fblob\u002Fmaster\u002Fmmdnn\u002Fconversion\u002Fdarknet\u002FREADME.md) (Source only, Experiment)\n\n#### Tested models\n\nThe model conversion between currently supported frameworks is tested on some **ImageNet** models.\n\nModels | Caffe | Keras | TensorFlow | CNTK | MXNet | PyTorch  | CoreML | ONNX\n:-----:|:-----:|:-----:|:----------:|:----:|:-----:|:--------:|:------:|:-----:|\n[VGG 19](https:\u002F\u002Farxiv.org\u002Fabs\u002F1409.1556.pdf) | √ | √ | √ | √ | √ | √ | √ | √\n[Inception V1](https:\u002F\u002Farxiv.org\u002Fabs\u002F1409.4842v1) | √ | √ | √ | √ | √ | √ | √ | √\n[Inception V3](https:\u002F\u002Farxiv.org\u002Fabs\u002F1512.00567)  | √ | √ | √ | √ | √ | √ | √ | √\n[Inception V4](https:\u002F\u002Farxiv.org\u002Fabs\u002F1512.00567)  | √ | √ | √ | o | √ | √ | √ | √\n[ResNet V1](https:\u002F\u002Farxiv.org\u002Fabs\u002F1512.03385)                               |   ×   |   √   |     √      |   o  |   √   |    √ | √ | √\n[ResNet V2](https:\u002F\u002Farxiv.org\u002Fabs\u002F1603.05027)                               |   √   |   √   |     √      |   √  |   √   | √ | √ | √\n[MobileNet V1](https:\u002F\u002Farxiv.org\u002Fpdf\u002F1704.04861.pdf)                        |   ×   |   √   |     √      |   o  |   √   |    √       | √ | √ | √\n[MobileNet V2](https:\u002F\u002Farxiv.org\u002Fpdf\u002F1704.04861.pdf)                        |   ×   |   √   |     √      |   o  |   √   |    √       | √ | √ | √\n[Xception](https:\u002F\u002Farxiv.org\u002Fpdf\u002F1610.02357.pdf)                            |   √   |   √   |     √      |   o  |   ×   |    √ | √ | √ | √\n[SqueezeNet](https:\u002F\u002Farxiv.org\u002Fpdf\u002F1602.07360)                              |   √   |   √   |     √      |   √  |   √   |    √ | √ | √ | √\n[DenseNet](https:\u002F\u002Farxiv.org\u002Fabs\u002F1608.06993)                                |   √   |   √   |     √      |   √  |   √   |    √       | √ | √\n[NASNet](https:\u002F\u002Farxiv.org\u002Fabs\u002F1707.07012)                                  |   x   |   √   |     √      |   o  |   √   | √ | √ | x\n[ResNext](https:\u002F\u002Farxiv.org\u002Fabs\u002F1611.05431)                                 |   √   |   √   |     √      |   √  |   √   | √ | √ | √ | √ | √\n[voc FCN](https:\u002F\u002Fpeople.eecs.berkeley.edu\u002F~jonlong\u002Flong_shelhamer_fcn.pdf) |       |       |     √      |   √  |       |\nYolo3                                                                       |       |   √   |            |   √  |\n\n#### Usage\n\nOne command to achieve the conversion. Using TensorFlow **ResNet V2 152** to PyTorch as our example.\n\n```bash\n$ mmdownload -f tensorflow -n resnet_v2_152 -o .\u002F\n$ mmconvert -sf tensorflow -in imagenet_resnet_v2_152.ckpt.meta -iw imagenet_resnet_v2_152.ckpt --dstNodeName MMdnn_Output -df pytorch -om tf_resnet_to_pth.pth\n```\n\nDone.\n\n#### On-going frameworks\n\n- Torch7 (help wanted)\n- Chainer (help wanted)\n\n#### On-going Models\n\n- Face Detection\n- Semantic Segmentation\n- Image Style Transfer\n- Object Detection\n- RNN\n\n---\n\n### \u003Ca name=\"visualization\">Model Visualization\u003C\u002Fa>\n\nWe provide a [local visualizer](mmdnn\u002Fvisualization) to display the network architecture of a deep learning model.\nPlease refer to the [instruction](mmdnn\u002Fvisualization\u002FREADME.md).\n\n---\n\n## Examples\n\n### Official Tutorial\n\n- [Keras \"inception V3\" to CNTK](https:\u002F\u002Fgithub.com\u002FMicrosoft\u002FMMdnn\u002Fblob\u002Fmaster\u002Fdocs\u002Fkeras2cntk.md) and [related issue](https:\u002F\u002Fgithub.com\u002FMicrosoft\u002FMMdnn\u002Fissues\u002F19)\n\n- [TensorFlow slim model \"ResNet V2 152\" to PyTorch](https:\u002F\u002Fgithub.com\u002FMicrosoft\u002FMMdnn\u002Fblob\u002Fmaster\u002Fdocs\u002Ftf2pytorch.md)\n\n- [Mxnet model \"LResNet50E-IR\" to TensorFlow](https:\u002F\u002Fgithub.com\u002FMicrosoft\u002FMMdnn\u002Fissues\u002F85) and [related issue](https:\u002F\u002Fgithub.com\u002FMicrosoft\u002FMMdnn\u002Fissues\u002F135)\n\n### Users' Examples\n\n- [MXNet \"ResNet-152-11k\" to PyTorch](https:\u002F\u002Fgithub.com\u002FMicrosoft\u002FMMdnn\u002Fissues\u002F6)\n\n- [Another Example of MXNet \"ResNet-152-11k\" to PyTorch](https:\u002F\u002Fblog.paperspace.com\u002Fconvert-full-imagenet-pre-trained-model-from-mxnet-to-pytorch\u002F)\n\n- [MXNet \"ResNeXt\" to Keras](https:\u002F\u002Fgithub.com\u002FMicrosoft\u002FMMdnn\u002Fissues\u002F58)\n\n- [TensorFlow \"ResNet-101\" to PyTorch](https:\u002F\u002Fgithub.com\u002FMicrosoft\u002FMMdnn\u002Fissues\u002F22)\n\n- [TensorFlow \"mnist mlp model\" to CNTK](https:\u002F\u002Fgithub.com\u002FMicrosoft\u002FMMdnn\u002Fissues\u002F11)\n\n- [TensorFlow \"Inception_v3\" to MXNet](https:\u002F\u002Fgithub.com\u002FMicrosoft\u002FMMdnn\u002Fissues\u002F30)\n\n- [Caffe \"voc-fcn\" to TensorFlow](https:\u002F\u002Fgithub.com\u002FMicrosoft\u002FMMdnn\u002Fissues\u002F29)\n\n- [Caffe \"AlexNet\" to TensorFlow](https:\u002F\u002Fgithub.com\u002FMicrosoft\u002FMMdnn\u002Fissues\u002F10)\n\n- [Caffe \"inception_v4\" to TensorFlow](https:\u002F\u002Fgithub.com\u002FMicrosoft\u002FMMdnn\u002Fissues\u002F26)\n\n- [Caffe \"VGG16_SOD\" to TensorFlow](https:\u002F\u002Fgithub.com\u002FMicrosoft\u002FMMdnn\u002Fissues\u002F27)\n\n- [Caffe \"SqueezeNet v1.1\" to CNTK](https:\u002F\u002Fgithub.com\u002FMicrosoft\u002FMMdnn\u002Fissues\u002F48)\n\n---\n\n## Contributing\n\nMost contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to and actually do, grant us\nthe rights to use your contribution. For details, visit https:\u002F\u002Fcla.microsoft.com.\n\nWhen you submit a pull request, a CLA-bot will automatically determine whether you need to provide\na CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions\nprovided by the bot. You will only need to do this once across all repos using our CLA.\n\nThis project has adopted the [Microsoft Open Source Code of Conduct](https:\u002F\u002Fopensource.microsoft.com\u002Fcodeofconduct\u002F).\nFor more information see the [Code of Conduct FAQ](https:\u002F\u002Fopensource.microsoft.com\u002Fcodeofconduct\u002Ffaq\u002F) or\ncontact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.\n\n### Intermediate Representation\n\nThe intermediate representation stores the **network architecture** in **protobuf binary** and **pre-trained weights** in **NumPy** native format.\n\n> [Note!] Currently the IR weights data is in NHWC (channel last) format.\n\nDetails are in [ops.txt](https:\u002F\u002Fgithub.com\u002FMicrosoft\u002FMMdnn\u002Fblob\u002Fmaster\u002Fmmdnn\u002Fconversion\u002Fcommon\u002FIR\u002Fops.pbtxt) and [graph.proto](https:\u002F\u002Fgithub.com\u002FMicrosoft\u002FMMdnn\u002Fblob\u002Fmaster\u002Fmmdnn\u002Fconversion\u002Fcommon\u002FIR\u002Fgraph.proto). New operators and any comments are welcome.\n\n### Frameworks\n\nWe are working on other frameworks conversion and visualization, such as PyTorch, CoreML and so on. We're investigating more RNN related operators. Any contributions and suggestions are welcome! Details in [Contribution Guideline](https:\u002F\u002Fgithub.com\u002FMicrosoft\u002FMMdnn\u002Fwiki\u002FContribution-Guideline).\n\n## Authors\n\nYu Liu (Peking University): Project Developer & Maintainer\n\nCheng CHEN (Microsoft Research Asia): Caffe, CNTK, CoreML Emitter, Keras, MXNet, TensorFlow\n\nJiahao YAO (Peking University): CoreML, MXNet Emitter, PyTorch Parser; HomePage\n\nRu ZHANG (Chinese Academy of Sciences): CoreML Emitter, DarkNet Parser, Keras, TensorFlow frozen graph Parser; Yolo and SSD models; Tests\n\nYuhao ZHOU (Shanghai Jiao Tong University): MXNet\n\nTingting QIN (Microsoft Research Asia): Caffe Emitter\n\nTong ZHAN (Microsoft): ONNX Emitter\n\nQianwen WANG (Hong Kong University of Science and Technology): Visualization\n\n## Acknowledgements\n\nThanks to [Saumitro Dasgupta](https:\u002F\u002Fgithub.com\u002Fethereon), the initial code of *caffe -> IR converting* is references to his project [caffe-tensorflow](https:\u002F\u002Fgithub.com\u002Fethereon\u002Fcaffe-tensorflow).\n\n## License\nLicensed under the [MIT](LICENSE) license.\n","# ![MMdnn](https:\u002F\u002Fndqzpq.dm2304.livefilestore.com\u002Fy4mF9ON1vKrSy0ew9dM3Fw6KAvLzQza2nL9JiMSIfgfKLbqJPvuxwOC2VIur_Ycz4TvVpkibMkvKXrX-N9QOkyh0AaUW4qhWDak8cyM0UoLLxc57apyhfDaxflLlZrGqiJgzn1ztsxiaZMzglaIMhoo8kjPuZ5-vY7yoWXqJuhC1BDHOwgNPwIgzpxV1H4k1oQzmewThpAJ_w_fUHzianZtMw?width=35&height=35&cropmode=none) MMdnn\n\n[![PyPi Version](https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fv\u002Fmmdnn.svg)](https:\u002F\u002Fpypi.org\u002Fproject\u002Fmmdnn\u002F)\n[![License](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flicense-MIT-blue.svg)](LICENSE)\n[![Linux](https:\u002F\u002Ftravis-ci.org\u002FMicrosoft\u002FMMdnn.svg?branch=master)](https:\u002F\u002Ftravis-ci.org\u002FMicrosoft\u002FMMdnn)\n\nMMdnn 是一款功能全面、跨框架的工具，用于转换、可视化和诊断深度学习（DL）模型。\n“MM”代表模型管理，“dnn”则是深度神经网络的缩写。\n\n主要特性包括：\n\n- \u003Ca href=\"#conversion\">**模型转换**\u003C\u002Fa>\n\n  - 我们实现了一个通用的转换器，可以在不同框架之间转换深度学习模型，这意味着你可以在一个框架中训练模型，然后在另一个框架中部署它。\n\n- **模型再训练**\n\n  - 在模型转换过程中，我们会生成一些代码片段，以简化后续的再训练或推理过程。\n\n- **模型搜索与可视化**\n\n  - 我们提供了一个[模型集合](mmdnn\u002Fmodels\u002FREADME.md)，帮助你找到一些流行的模型。\n  - 我们还提供了一个\u003Ca href=\"#visualization\">模型可视化工具\u003C\u002Fa>,可以更直观地展示网络架构。\n\n- **模型部署**\n\n  - 我们提供了一些指南，帮助你将深度学习模型部署到其他硬件平台上。\n    - [Android](https:\u002F\u002Fgithub.com\u002FMicrosoft\u002FMMdnn\u002Fwiki\u002FDeploy-your-TensorFlow-Lite-Model-in-Android)\n    - [服务端部署](https:\u002F\u002Fgithub.com\u002FMicrosoft\u002FMMdnn\u002Fwiki\u002FTensorflow-Serving-Via-Docker)\n    \n  - 我们还提供了一篇指南，帮助你使用 TensorRT 加速推理。\n    - [TensorRT](https:\u002F\u002Fgithub.com\u002FMicrosoft\u002FMMdnn\u002Fwiki\u002FUsing-TensorRT-to-Accelerate-Inference)\n  \n\n## 相关项目\n\n为了推动开放性和前沿技术的发展，[微软亚洲研究院（MSR）](https:\u002F\u002Fwww.microsoft.com\u002Fen-us\u002Fresearch\u002Fgroup\u002Fsystems-and-networking-research-group-asia\u002F) 和 [微软软件技术中心（STC）](https:\u002F\u002Fwww.microsoft.com\u002Fen-us\u002Fard\u002Fcompany\u002Fintroduction.aspx) 也发布了一些开源项目：\n\n* [OpenPAI](https:\u002F\u002Fgithub.com\u002FMicrosoft\u002Fpai)：一个开源平台，提供完整的 AI 模型训练和资源管理能力，易于扩展，支持各种规模的本地、云及混合环境。\n* [FrameworkController](https:\u002F\u002Fgithub.com\u002FMicrosoft\u002Fframeworkcontroller)：一个开源的通用 Kubernetes Pod 控制器，可以通过单一控制器编排 Kubernetes 上的各种应用。\n* [NNI](https:\u002F\u002Fgithub.com\u002FMicrosoft\u002Fnni)：一个轻量级但功能强大的工具包，帮助用户自动化特征工程、神经架构搜索、超参数调优和模型压缩。\n* [NeuronBlocks](https:\u002F\u002Fgithub.com\u002FMicrosoft\u002FNeuronBlocks)：一个 NLP 深度学习建模工具包，帮助工程师像搭乐高积木一样构建 DNN 模型。该工具包的主要目标是最大限度地降低 NLP 深度神经网络模型开发的成本，涵盖训练和推理两个阶段。\n* [SPTAG](https:\u002F\u002Fgithub.com\u002FMicrosoft\u002FSPTAG)：空间划分树与图（SPTAG）是一个开源库，适用于大规模向量近似最近邻搜索场景。\n\n我们鼓励研究人员、开发者和学生利用这些项目来提升他们在人工智能和深度学习领域的效率。\n\n## 安装\n\n### 手动安装\n\n你可以通过以下命令获取 MMdnn 的稳定版本：\n\n```bash\npip install mmdnn\n```\n请确保已安装 [Python](https:\u002F\u002Fwww.python.org\u002F)，\n或者你也可以尝试最新版本：\n\n```bash\npip install -U git+https:\u002F\u002Fgithub.com\u002FMicrosoft\u002FMMdnn.git@master\n```\n\n### 使用 Docker 镜像安装\n\nMMdnn 提供了一个 Docker 镜像，其中包含了 MMdnn、我们支持的深度学习框架以及其他依赖项。\n你可以按照以下步骤轻松试用该镜像：\n\n1. 安装 Docker 社区版（CE）\n\n    [_了解如何安装 Docker_](https:\u002F\u002Fgithub.com\u002FMicrosoft\u002FMMdnn\u002Fblob\u002Fmaster\u002Fdocs\u002FInstallDockerCE.md)\n\n1. 拉取 MMdnn 的 Docker 镜像\n    ```bash\n    docker pull mmdnn\u002Fmmdnn:cpu.small\n    ```\n\n1. 以交互模式运行镜像\n\n    ```bash\n    docker run -it mmdnn\u002Fmmdnn:cpu.small\n    ```\n\n## 特性\n\n### \u003Ca name=\"conversion\">模型转换\u003C\u002Fa>\n\n在工业界和学术界，有许多现成的框架可供开发者和研究人员设计模型使用，每个框架都有其独特的网络结构定义和模型保存格式。不同框架之间的差异阻碍了模型的互操作性。\n\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmicrosoft_MMdnn_readme_3069e386d1b5.jpg\" width=\"633\" >\n\n我们提供了一个模型转换工具，帮助开发者通过中间表示格式在不同框架之间进行模型转换。\n\n#### 支持的框架\n\n> [注] 您可以点击链接查看各个框架的详细 README 文档。\n\n- [Caffe](https:\u002F\u002Fgithub.com\u002FMicrosoft\u002FMMdnn\u002Fblob\u002Fmaster\u002Fmmdnn\u002Fconversion\u002Fcaffe\u002FREADME.md)\n- [Microsoft Cognitive Toolkit (CNTK)](https:\u002F\u002Fgithub.com\u002FMicrosoft\u002FMMdnn\u002Fblob\u002Fmaster\u002Fmmdnn\u002Fconversion\u002Fcntk\u002FREADME.md)\n- [CoreML](https:\u002F\u002Fgithub.com\u002FMicrosoft\u002FMMdnn\u002Fblob\u002Fmaster\u002Fmmdnn\u002Fconversion\u002Fcoreml\u002FREADME.md)\n- [Keras](https:\u002F\u002Fgithub.com\u002FMicrosoft\u002FMMdnn\u002Fblob\u002Fmaster\u002Fmmdnn\u002Fconversion\u002Fkeras\u002FREADME.md)\n- [MXNet](https:\u002F\u002Fgithub.com\u002FMicrosoft\u002FMMdnn\u002Fblob\u002Fmaster\u002Fmmdnn\u002Fconversion\u002Fmxnet\u002FREADME.md)\n- [ONNX](https:\u002F\u002Fgithub.com\u002FMicrosoft\u002FMMdnn\u002Fblob\u002Fmaster\u002Fmmdnn\u002Fconversion\u002Fonnx\u002FREADME.md)（仅作为目标框架）\n- [PyTorch](https:\u002F\u002Fgithub.com\u002FMicrosoft\u002FMMdnn\u002Fblob\u002Fmaster\u002Fmmdnn\u002Fconversion\u002Fpytorch\u002FREADME.md)\n- [TensorFlow](https:\u002F\u002Fgithub.com\u002FMicrosoft\u002FMMdnn\u002Fblob\u002Fmaster\u002Fmmdnn\u002Fconversion\u002Ftensorflow\u002FREADME.md)（实验性）（强烈建议您先阅读 TensorFlow 的 README）\n- [DarkNet](https:\u002F\u002Fgithub.com\u002FMicrosoft\u002FMMdnn\u002Fblob\u002Fmaster\u002Fmmdnn\u002Fconversion\u002Fdarknet\u002FREADME.md)（仅作为源框架，实验阶段）\n\n#### 测试过的模型\n\n目前支持的框架之间的模型转换已在一些 **ImageNet** 模型上进行了测试。\n\n模型 | Caffe | Keras | TensorFlow | CNTK | MXNet | PyTorch  | CoreML | ONNX\n:-----:|:-----:|:-----:|:----------:|:----:|:-----:|:--------:|:------:|:-----:|\n[VGG 19](https:\u002F\u002Farxiv.org\u002Fabs\u002F1409.1556.pdf) | √ | √ | √ | √ | √ | √ | √ | √\n[Inception V1](https:\u002F\u002Farxiv.org\u002Fabs\u002F1409.4842v1) | √ | √ | √ | √ | √ | √ | √ | √\n[Inception V3](https:\u002F\u002Farxiv.org\u002Fabs\u002F1512.00567)  | √ | √ | √ | √ | √ | √ | √ | √\n[Inception V4](https:\u002F\u002Farxiv.org\u002Fabs\u002F1512.00567)  | √ | √ | √ | o | √ | √ | √ | √\n[ResNet V1](https:\u002F\u002Farxiv.org\u002Fabs\u002F1512.03385)                               |   ×   |   √   |     √      |   o  |   √   |    √ | √ | √\n[ResNet V2](https:\u002F\u002Farxiv.org\u002Fabs\u002F1603.05027)                               |   √   |   √   |     √      |   √  |   √   | √ | √ | √\n[MobileNet V1](https:\u002F\u002Farxiv.org\u002Fpdf\u002F1704.04861.pdf)                        |   ×   |   √   |     √      |   o  |   √   |    √       | √ | √ | √\n[MobileNet V2](https:\u002F\u002Farxiv.org\u002Fpdf\u002F1704.04861.pdf)                        |   ×   |   √   |     √      |   o  |   √   |    √       | √ | √ | √\n[Xception](https:\u002F\u002Farxiv.org\u002Fpdf\u002F1610.02357.pdf)                            |   √   |   √   |     √      |   o  |   ×   |    √ | √ | √ | √\n[SqueezeNet](https:\u002F\u002Farxiv.org\u002Fpdf\u002F1602.07360)                              |   √   |   √   |     √      |   √  |   √   |    √ | √ | √ | √\n[DenseNet](https:\u002F\u002Farxiv.org\u002Fabs\u002F1608.06993)                                |   √   |   √   |     √      |   √  |   √   |    √       | √ | √\n[NASNet](https:\u002F\u002Farxiv.org\u002Fabs\u002F1707.07012)                                  |   x   |   √   |     √      |   o  |   √   | √ | √ | x\n[ResNext](https:\u002F\u002Farxiv.org\u002Fabs\u002F1611.05431)                                 |   √   |   √   |     √      |   √  |   √   | √ | √ | √ | √ | √\n[voc FCN](https:\u002F\u002Fpeople.eecs.berkeley.edu\u002F~jonlong\u002Flong_shelhamer_fcn.pdf) |       |       |     √      |   √  |       |\nYolo3                                                                       |       |   √   |            |   √  |\n\n#### 使用方法\n\n只需一条命令即可完成转换。以将 TensorFlow 的 **ResNet V2 152** 转换为 PyTorch 为例：\n\n```bash\n$ mmdownload -f tensorflow -n resnet_v2_152 -o .\u002F\n$ mmconvert -sf tensorflow -in imagenet_resnet_v2_152.ckpt.meta -iw imagenet_resnet_v2_152.ckpt --dstNodeName MMdnn_Output -df pytorch -om tf_resnet_to_pth.pth\n```\n\n完成。\n\n#### 正在开发中的框架\n\n- Torch7（寻求帮助）\n- Chainer（寻求帮助）\n\n#### 正在开发中的模型\n\n- 人脸检测\n- 语义分割\n- 图像风格迁移\n- 目标检测\n- RNN\n\n---\n\n### \u003Ca name=\"visualization\">模型可视化\u003C\u002Fa>\n\n我们提供了一个 [本地可视化工具](mmdnn\u002Fvisualization)，用于展示深度学习模型的网络架构。\n请参阅 [使用说明](mmdnn\u002Fvisualization\u002FREADME.md)。\n\n---\n\n## 示例\n\n### 官方教程\n\n- [Keras \"inception V3\" 转 CNTK](https:\u002F\u002Fgithub.com\u002FMicrosoft\u002FMMdnn\u002Fblob\u002Fmaster\u002Fdocs\u002Fkeras2cntk.md) 和 [相关问题](https:\u002F\u002Fgithub.com\u002FMicrosoft\u002FMMdnn\u002Fissues\u002F19)\n\n- [TensorFlow slim 模型 \"ResNet V2 152\" 转 PyTorch](https:\u002F\u002Fgithub.com\u002FMicrosoft\u002FMMdnn\u002Fblob\u002Fmaster\u002Fdocs\u002Ftf2pytorch.md)\n\n- [Mxnet 模型 \"LResNet50E-IR\" 转 TensorFlow](https:\u002F\u002Fgithub.com\u002FMicrosoft\u002FMMdnn\u002Fissues\u002F85) 和 [相关问题](https:\u002F\u002Fgithub.com\u002FMicrosoft\u002FMMdnn\u002Fissues\u002F135)\n\n### 用户示例\n\n- [MXNet \"ResNet-152-11k\" 转 PyTorch](https:\u002F\u002Fgithub.com\u002FMicrosoft\u002FMMdnn\u002Fissues\u002F6)\n\n- [另一个 MXNet \"ResNet-152-11k\" 转 PyTorch 的示例](https:\u002F\u002Fblog.paperspace.com\u002Fconvert-full-imagenet-pre-trained-model-from-mxnet-to-pytorch\u002F)\n\n- [MXNet \"ResNeXt\" 转 Keras](https:\u002F\u002Fgithub.com\u002FMicrosoft\u002FMMdnn\u002Fissues\u002F58)\n\n- [TensorFlow \"ResNet-101\" 转 PyTorch](https:\u002F\u002Fgithub.com\u002FMicrosoft\u002FMMdnn\u002Fissues\u002F22)\n\n- [TensorFlow \"mnist mlp 模型\" 转 CNTK](https:\u002F\u002Fgithub.com\u002FMicrosoft\u002FMMdnn\u002Fissues\u002F11)\n\n- [TensorFlow \"Inception_v3\" 转 MXNet](https:\u002F\u002Fgithub.com\u002FMicrosoft\u002FMMdnn\u002Fissues\u002F30)\n\n- [Caffe \"voc-fcn\" 转 TensorFlow](https:\u002F\u002Fgithub.com\u002FMicrosoft\u002FMMdnn\u002Fissues\u002F29)\n\n- [Caffe \"AlexNet\" 转 TensorFlow](https:\u002F\u002Fgithub.com\u002FMicrosoft\u002FMMdnn\u002Fissues\u002F10)\n\n- [Caffe \"inception_v4\" 转 TensorFlow](https:\u002F\u002Fgithub.com\u002FMicrosoft\u002FMMdnn\u002Fissues\u002F26)\n\n- [Caffe \"VGG16_SOD\" 转 TensorFlow](https:\u002F\u002Fgithub.com\u002FMicrosoft\u002FMMdnn\u002Fissues\u002F27)\n\n- [Caffe \"SqueezeNet v1.1\" 转 CNTK](https:\u002F\u002Fgithub.com\u002FMicrosoft\u002FMMdnn\u002Fissues\u002F48)\n\n---\n\n## 贡献\n\n大多数贡献都需要您同意签署贡献者许可协议（CLA），声明您有权并确实授予我们使用您的贡献的权利。有关详情，请访问 https:\u002F\u002Fcla.microsoft.com。\n\n当您提交拉取请求时，CLA 机器人会自动判断您是否需要提供 CLA，并相应地标记或评论您的 PR。只需按照机器人提供的指示操作即可。对于所有使用我们 CLA 的仓库，您只需执行一次此操作。\n\n本项目已采用 [微软开源行为准则](https:\u002F\u002Fopensource.microsoft.com\u002Fcodeofconduct\u002F)。如需更多信息，请参阅 [行为准则常见问题解答](https:\u002F\u002Fopensource.microsoft.com\u002Fcodeofconduct\u002Ffaq\u002F)，或发送电子邮件至 [opencode@microsoft.com](mailto:opencode@microsoft.com) 咨询更多问题或意见。\n\n### 中间表示\n\n中间表示以 **protobuf 二进制** 格式存储 **网络架构**，并以 **NumPy 原生格式** 存储 **预训练权重**。\n\n> [注意！] 目前 IR 权重数据采用 NHWC（通道在后）格式。\n\n详细信息请参阅 [ops.txt](https:\u002F\u002Fgithub.com\u002FMicrosoft\u002FMMdnn\u002Fblob\u002Fmaster\u002Fmmdnn\u002Fconversion\u002Fcommon\u002FIR\u002Fops.pbtxt) 和 [graph.proto](https:\u002F\u002Fgithub.com\u002FMicrosoft\u002FMMdnn\u002Fblob\u002Fmaster\u002Fmmdnn\u002Fconversion\u002Fcommon\u002FIR\u002Fgraph.proto)。欢迎添加新算子及相关注释。\n\n### 框架支持\n\n我们正在开发对其他框架的转换与可视化功能，例如 PyTorch、CoreML 等。同时也在研究更多与 RNN 相关的算子。欢迎各位贡献代码或提出建议！详情请参阅 [贡献指南](https:\u002F\u002Fgithub.com\u002FMicrosoft\u002FMMdnn\u002Fwiki\u002FContribution-Guideline)。\n\n## 作者\n\n刘宇（北京大学）：项目开发者及维护者\n\n陈诚（微软亚洲研究院）：Caffe、CNTK、CoreML 发射器、Keras、MXNet、TensorFlow\n\n姚嘉豪（北京大学）：CoreML、MXNet 发射器、PyTorch 解析器；个人主页\n\n张儒（中国科学院）：CoreML 发射器、DarkNet 解析器、Keras、TensorFlow 冻结图解析器；Yolo 和 SSD 模型；测试工作\n\n周宇浩（上海交通大学）：MXNet\n\n秦婷婷（微软亚洲研究院）：Caffe 发射器\n\n詹通（微软）：ONNX 发射器\n\n王倩雯（香港科技大学）：可视化\n\n## 致谢\n\n感谢 [Saumitro Dasgupta](https:\u002F\u002Fgithub.com\u002Fethereon)，*Caffe -> IR 转换* 的初始代码参考了其项目 [caffe-tensorflow](https:\u002F\u002Fgithub.com\u002Fethereon\u002Fcaffe-tensorflow)。\n\n## 许可证\n本项目采用 [MIT](LICENSE) 许可证授权。","# MMdnn 快速上手指南\n\nMMdnn 是一个跨框架的深度学习模型转换、可视化和诊断工具。它允许你在一个框架中训练模型，然后轻松转换并部署到另一个框架中。\n\n## 环境准备\n\n*   **操作系统**：支持 Linux、macOS 和 Windows。\n*   **Python 版本**：需要安装 Python (推荐 Python 3.6+)。\n*   **前置依赖**：确保已安装 `pip` 包管理工具。\n*   **目标框架**：根据转换需求，可能需要安装对应的深度学习框架（如 TensorFlow, PyTorch, Keras, Caffe, MXNet, CNTK 等）及其依赖库。\n\n> **提示**：国内用户若遇到网络问题，建议使用国内镜像源加速 pip 安装（如阿里云或清华源）。\n\n## 安装步骤\n\n你可以通过以下两种方式安装 MMdnn：\n\n### 方式一：通过 Pip 安装（推荐）\n\n安装稳定版本：\n```bash\npip install mmdnn\n```\n\n或者安装最新的开发版本：\n```bash\npip install -U git+https:\u002F\u002Fgithub.com\u002FMicrosoft\u002FMMdnn.git@master\n```\n\n*(国内加速示例)*\n```bash\npip install mmdnn -i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple\n```\n\n### 方式二：使用 Docker 镜像\n\n如果你希望避免配置复杂的环境依赖，可以直接使用官方提供的 Docker 镜像，其中已预装了 MMdnn 及支持的深度学习框架。\n\n1.  **拉取镜像**：\n    ```bash\n    docker pull mmdnn\u002Fmmdnn:cpu.small\n    ```\n\n2.  **运行容器**：\n    ```bash\n    docker run -it mmdnn\u002Fmmdnn:cpu.small\n    ```\n\n## 基本使用\n\nMMdnn 的核心功能是模型转换。通常分为两步：下载预训练模型（可选）和执行转换。\n\n以下示例演示如何将 **TensorFlow** 的 ResNet V2 152 模型转换为 **PyTorch** 格式。\n\n### 第一步：下载源模型\n使用 `mmdownload` 命令从内置库中下载模型文件。\n\n```bash\nmmdownload -f tensorflow -n resnet_v2_152 -o .\u002F\n```\n*执行后将在当前目录生成 `imagenet_resnet_v2_152.ckpt.meta` 和 `imagenet_resnet_v2_152.ckpt` 等文件。*\n\n### 第二步：执行模型转换\n使用 `mmconvert` 命令进行格式转换。\n\n```bash\nmmconvert -sf tensorflow -in imagenet_resnet_v2_152.ckpt.meta -iw imagenet_resnet_v2_152.ckpt --dstNodeName MMdnn_Output -df pytorch -om tf_resnet_to_pth.pth\n```\n\n**参数说明：**\n*   `-sf`: 源框架 (source framework)，此处为 `tensorflow`。\n*   `-in`: 源模型结构文件路径。\n*   `-iw`: 源模型权重文件路径。\n*   `--dstNodeName`: 输出节点名称（对于 TensorFlow 模型通常需要指定）。\n*   `-df`: 目标框架 (destination framework)，此处为 `pytorch`。\n*   `-om`: 输出模型文件名。\n\n转换完成后，你将得到 `tf_resnet_to_pth.pth` 文件，即可在 PyTorch 环境中加载使用。\n\n### 其他支持框架\nMMdnn 支持多种框架间的互转，包括但不限于：\n*   Caffe\n*   Keras\n*   MXNet\n*   CNTK\n*   CoreML\n*   DarkNet (仅作为源)\n*   ONNX (仅作为目标)\n\n只需修改上述命令中的 `-sf` 和 `-df` 参数即可适配不同框架。","某计算机视觉团队在 PyTorch 中训练出高精度图像分类模型，却需将其部署到仅支持 TensorFlow Lite 的安卓移动端设备上。\n\n### 没有 MMdnn 时\n- **手动重写成本高**：工程师必须逐层对照网络结构，在 TensorFlow 中重新编写模型代码，极易因细节疏忽导致结构不一致。\n- **权重迁移困难**：缺乏自动化工具将 PyTorch 的权重文件转换为 TensorFlow 格式，人工映射参数不仅耗时且容易出错。\n- **调试周期漫长**：转换后的模型精度往往大幅下降，团队需花费数天时间排查是结构差异还是数值精度问题。\n- **框架锁定风险**：一旦目标硬件更换（如从安卓换为 iOS CoreML），整个迁移流程需推倒重来，严重阻碍业务迭代。\n\n### 使用 MMdnn 后\n- **一键跨框架转换**：利用 MMdnn 的通用转换器，仅需一条命令即可将 PyTorch 模型直接转换为 TensorFlow 格式，无需手动重写代码。\n- **自动化权重映射**：工具自动处理不同框架间的算子对应关系与权重格式转换，确保参数无损迁移，精度保持一致。\n- **可视化辅助诊断**：通过内置的模型可视化功能，直观对比转换前后的网络架构，快速定位并修复潜在的算子不支持问题。\n- **灵活部署适配**：借助生成的代码片段和部署指南，轻松将模型进一步转为 TFLite 或 CoreML 格式，快速适配各类终端硬件。\n\nMMdnn 打破了深度学习框架间的壁垒，让模型训练与部署解耦，显著降低了跨平台落地的技术门槛与时间成本。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmicrosoft_MMdnn_99512e15.png","microsoft","Microsoft","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fmicrosoft_4900709c.png","Open source projects and samples from Microsoft",null,"opensource@microsoft.com","OpenAtMicrosoft","https:\u002F\u002Fopensource.microsoft.com","https:\u002F\u002Fgithub.com\u002Fmicrosoft",[85,89,93,97,101,105],{"name":86,"color":87,"percentage":88},"Python","#3572A5",94.7,{"name":90,"color":91,"percentage":92},"JavaScript","#f1e05a",2.3,{"name":94,"color":95,"percentage":96},"TypeScript","#3178c6",1.9,{"name":98,"color":99,"percentage":100},"CSS","#663399",0.8,{"name":102,"color":103,"percentage":104},"HTML","#e34c26",0.3,{"name":106,"color":107,"percentage":108},"Shell","#89e051",0.1,5813,957,"2026-04-02T08:35:50","MIT","Linux, macOS, Windows","未说明 (工具支持 CPU 模式，Docker 镜像名为 cpu.small；GPU 需求取决于具体转换的目标深度学习框架)","未说明",{"notes":117,"python":118,"dependencies":119},"该工具主要用于不同深度学习框架间的模型转换。可通过 pip 直接安装或使用提供的 Docker 镜像 (mmdnn\u002Fmmdnn:cpu.small) 运行，后者已预装支持的框架和依赖。中间表示 (IR) 的权重数据目前采用 NHWC (通道在后) 格式。部分框架支持（如 TensorFlow）标记为实验性，DarkNet 仅支持作为源框架。","未说明 (需安装 Python，具体版本未指定，通常建议 Python 3.x)",[120,121,122],"protobuf","numpy","目标框架依赖 (如 TensorFlow, PyTorch, Keras, Caffe, MXNet, CNTK, CoreML 等)",[13],[125,126,127,128,129,130,131,132,133,134,135],"cntk","visualization","tensorflow","model-converter","pytorch","caffe","keras","mxnet","coreml","onnx","darknet","2026-03-27T02:49:30.150509","2026-04-06T05:15:56.206586",[139,144,149,154,159,164],{"id":140,"question_zh":141,"answer_zh":142,"source_url":143},16857,"如何将 MXNet 预训练模型转换为 PyTorch 格式？","可以参考外部教程进行转换，例如 Paperspace 提供的指南：'Convert Full ImageNet Pre-trained Model from MXNet to PyTorch'。用户反馈按照该链接的指示操作非常顺利。","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FMMdnn\u002Fissues\u002F6",{"id":145,"question_zh":146,"answer_zh":147,"source_url":148},16858,"为什么将 TensorFlow Mobilenet V2 转换为 Caffe 时会报错 '_data' 检查失败？","这通常是因为步骤顺序错误或 ReLU6 层不支持。正确的步骤是：1. 将 TF Mobilenet V2 转换为 IR (中间表示)；2. 将 IR 转换为 Caffe 模型代码；3. 手动修改生成的 Caffe 代码（特别是将 relu 改为 relu6）。对于 ReLU6 支持问题，可能需要使用第三方实现的 Caffe 版本，或者参考相关仓库（如 Caffe-MobileNetV2-ReLU6）进行修改。","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FMMdnn\u002Fissues\u002F375",{"id":150,"question_zh":151,"answer_zh":152,"source_url":153},16859,"在使用 MMdnn 转换 Keras 模型时遇到 'AttributeError: module keras.applications.mobilenet has no attribute relu6' 错误怎么办？","这通常是由于 TensorFlow 或 Keras 版本不兼容导致的。尝试升级 TensorFlow 到较新版本（例如 1.12.0）可能解决此问题。命令示例：pip3.7 install --upgrade https:\u002F\u002Fstorage.googleapis.com\u002Ftensorflow\u002Fmac\u002Fcpu\u002Ftensorflow-1.12.0-py3-none-any.whl。如果问题依旧，可以尝试在加载模型时使用 CustomObjectScope 自定义 relu6 和 DepthwiseConv2D 层。","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FMMdnn\u002Fissues\u002F268",{"id":155,"question_zh":156,"answer_zh":157,"source_url":158},16860,"如何将只有 .data, .index, .meta 文件而没有 .ckpt 文件的 TensorFlow 模型转换为 PyTorch (.pt\u002F.pkl)？","这是一个常见问题，通常发生在 TensorFlow 1.14+ 生成的模型中。虽然 Issue 中没有直接给出完整代码解决方案，但表明许多用户遇到此问题。一般解决方法是使用 TensorFlow 的 save_model 或 export 功能先将这些文件重新保存为标准的 .ckpt 格式或 SavedModel 格式，然后再使用 MMdnn 进行转换。如果直接使用 mmconvert 失败，可能需要检查输入参数是否正确指向了 meta 文件。","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FMMdnn\u002Fissues\u002F22",{"id":160,"question_zh":161,"answer_zh":162,"source_url":163},16861,"如何将 MXNet 模型转换并保存为 TensorFlow Serving 所需的 .pb 和 variables 格式？","首先使用 MMdnn 将 MXNet 模型转换为 TensorFlow Checkpoint 格式。然后，使用 TensorFlow 的 SavedModelBuilder 或加载会话的方式将其导出为 Serving 格式。关键代码片段如下：\nexport_dir = \".\u002Ftf_resnet152\"\nwith tf.Session(graph=tf.Graph()) as sess:\n    tf.saved_model.loader.load(sess, [tf.saved_model.tag_constants.TRAINING], export_dir)\n    x = sess.graph.get_tensor_by_name('input:0') # 替换为实际的输入张量名\n    y = sess.graph.get_tensor_by_name('output:0') # 替换为实际的输出张量名\n    # 执行一次推理以初始化变量（可选，视情况而定）\n    # _y = sess.run(y, feed_dict={x: _x})\n注意需要将 'input:0' 和 'output:0' 替换为你模型中实际的输入和输出张量名称。","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FMMdnn\u002Fissues\u002F221",{"id":165,"question_zh":166,"answer_zh":167,"source_url":168},16862,"从 IR 转换到 CNTK 时遇到 leaky_relu 或 upsampling2d 层错误如何处理？","如果在转换过程中遇到特定层（如 leaky_relu, upsampling2d）不支持的错误，可能需要手动修改生成的 CNTK 代码文件。根据错误提示的文件路径（例如 ...\u002Fimagenet_test.py），找到对应的行并进行调整。例如，有建议将 self.model.save(path) 修改为 C.combine(self.model...) 或其他适配 CNTK API 的写法。由于 CNTK 对某些层的支持有限，有时需要变通实现或跳过某些层。","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FMMdnn\u002Fissues\u002F143",[170,175,180,185,190,195,200,205,210,214,219,224],{"id":171,"version":172,"summary_zh":173,"released_at":174},99123,"0.3.1","初步支持 PyTorch 1.5.1。","2020-07-24T06:14:52",{"id":176,"version":177,"summary_zh":178,"released_at":179},99124,"0.3.0","# 依赖项更新：\n* NumPy 1.15.4 至 1.18.2\n* Pillow 5.2.0 至 6.2.2\n* TensorFlow 1.13.1 至 1.15.2\n* Keras 2.2.4 至 2.2.5\n* MXNet 1.2.0 至 1.6.0\n* CNTK 2.6 至 2.7\n* SciPy==1.4.1\n* Scikit-image==0.16.2\n\n# 修复的缺陷与改进：\n* 修复算子 [LRN]\n* 修复 tensorflow_parser 中的 [Slice] 和 [DepthwiseConv2dNative]\n* 修复 caffe_emitter 中的 [Relu6]\n* 新增算子 [Unpool]\n* 新增 Keras 算子 [Affine]\n* 新增 TensorFlow 算子 [AddV2] 和 [FusedBatchNormV3]\n* 稳定性提升。\n\n# 提示：\n我们推荐使用 Python 3.6，因为 Python 2 已经停止维护。如果您在使用其他 Python 3.x 版本时遇到兼容性问题，请提交 issue。","2020-05-03T05:48:55",{"id":181,"version":182,"summary_zh":183,"released_at":184},99125,"0.2.5","## 依赖项更新：\r\n\r\n\tNumpy 1.14.5 至 1.15.4\r\n\tTensorFlow 1.9.0 至 1.13.1\r\n\tKeras 2.1.6 至 2.2.4\r\n\tCoreML 0.8 至 2.1.0\r\n\tCNTK 2.5.1 至 2.6\r\n\tMXNet 1.1.0 post0 至 1.2.0\r\n\tONNX 1.2.1 至 1.4.1\r\n\tONNX-TF 1.2.1（Python 3），1.1.2（Python 2）\r\n\r\n## 错误修复与改进：\r\n\r\n + 修复 Caffe 常量导出问题\r\n + 添加 Visual Studio 解决方案文件\r\n + 添加 PyTorch 导出 [PReLU]\r\n + 添加 TF 解析器及 PyTorch 导出 [Cast]\r\n + 添加 Keras 解析器 [Conv1DTranspose]、[Conv2DTranspose]、[Conv3DTranspose]","2019-04-15T05:23:46",{"id":186,"version":187,"summary_zh":188,"released_at":189},99126,"0.2.4","1. 针对 RNN 算子（包括 GRU 单元和 LSTM 单元，暂不支持 peephole 连接）进行了初步实现：通过匹配单元的对应模式，将其融合为目标框架中的函数或类。\n\n2. 修复了多个问题，并提升了系统稳定性。","2019-03-03T15:21:52",{"id":191,"version":192,"summary_zh":193,"released_at":194},99127,"0.2.3","![ir](https:\u002F\u002Fuser-images.githubusercontent.com\u002F42927787\u002F53691143-fbd4a180-3db2-11e9-817e-041af6f4e1be.png)\n","2019-03-03T15:21:25",{"id":196,"version":197,"summary_zh":198,"released_at":199},99128,"0.2.2","![ir](https:\u002F\u002Fuser-images.githubusercontent.com\u002F42927787\u002F53691114-77821e80-3db2-11e9-9b4b-09a8bd94f430.png)\n\n1. 在 TensorFlow 冻结解析器中支持 SSD 和 Faster R-CNN。\n\n2. 初步支持 ResNet-v2、Inception-ResNet-v2 和 FaceNet。\n\n3. 添加了一些操作，包括 Pack、Shape、Scale、StrideSlice、PReLU、Mul、Abs、Sub 和 Squeeze。\n","2019-03-03T15:21:01",{"id":201,"version":202,"summary_zh":203,"released_at":204},99129,"0.2.1","![图片](https:\u002F\u002Fuser-images.githubusercontent.com\u002F9545003\u002F40484165-405b0fd8-5f8d-11e8-9f09-5e8c91a581a7.png)\n\n","2018-05-24T12:02:01",{"id":206,"version":207,"summary_zh":208,"released_at":209},99130,"0.2.0","![image](https:\u002F\u002Fuser-images.githubusercontent.com\u002F9545003\u002F40093161-7c68fd14-58f3-11e8-851e-cc788ed2d12a.png)\n\nCoreML 解析器以及 Caffe\u002FOnnx\u002FCoreML 代码生成器正式发布。Darknet 解析器初版发布。","2018-05-16T02:26:28",{"id":211,"version":212,"summary_zh":79,"released_at":213},99131,"0.1.4","2018-03-22T12:21:56",{"id":215,"version":216,"summary_zh":217,"released_at":218},99132,"0.1.3","![图片](https:\u002F\u002Fuser-images.githubusercontent.com\u002F9545003\u002F36651934-90acf55a-1ae6-11e8-9514-3ba0d4f5213f.png)","2018-02-26T03:17:50",{"id":220,"version":221,"summary_zh":222,"released_at":223},99133,"0.1.2","## 支持框架\n\n![supported](https:\u002F\u002Fuser-images.githubusercontent.com\u002F9545003\u002F33427074-f7bf94f0-d5fe-11e7-917e-01fbe865ad76.png)\n\n## 支持的网络\n\n模型                                              | Caffe | Keras | Tensorflow | CNTK | MXNet | PyTorch |\n:--------------------------------------------------:|:-----:|:-----:|:----------:|:----:|:-----:|:-------:|\n[Inception V1](http:\u002F\u002Farxiv.org\u002Fabs\u002F1409.4842v1)    |   √   |   √   |     √      |   √  |   √\n[Inception V3](http:\u002F\u002Farxiv.org\u002Fabs\u002F1512.00567)     |   ×   |   √   |     √      |   √  |   √\n[ResNet V1 50](https:\u002F\u002Farxiv.org\u002Fabs\u002F1512.03385)    |   ×   |   √   |     √      |   o  |   √   |    √\n[ResNet V2 152](https:\u002F\u002Farxiv.org\u002Fabs\u002F1603.05027)   |   ×   |   √   |     √      |   √  |   √   |\n[VGG 19](http:\u002F\u002Farxiv.org\u002Fabs\u002F1409.1556.pdf)        |   √   |   √   |     √      |   √  |   √   |    √\n[MobileNet_v1](https:\u002F\u002Farxiv.org\u002Fpdf\u002F1704.04861.pdf)|   ×   |   √   |     √      | × (无Relu6) |    ×\n[Xception]((https:\u002F\u002Farxiv.org\u002Fabs\u002F1610.02357))      |   ×   |   √   |     √      |   ×  |   ×   |\n[SqueezeNet](https:\u002F\u002Farxiv.org\u002Fpdf\u002F1602.07360)      |       |   √   |     √      |   √  |   √   |","2017-12-18T08:21:37",{"id":225,"version":226,"summary_zh":227,"released_at":228},99134,"0.1.1","## Support Framework\r\n\r\n![supported](https:\u002F\u002Fuser-images.githubusercontent.com\u002F9545003\u002F33427074-f7bf94f0-d5fe-11e7-917e-01fbe865ad76.png)\r\n\r\n## Support Network\r\n\r\nModels                                              | Caffe | Keras | Tensorflow | CNTK | MXNet | PyTorch |\r\n:--------------------------------------------------:|:-----:|:-----:|:----------:|:----:|:-----:|:-------:|\r\n[Inception V1](http:\u002F\u002Farxiv.org\u002Fabs\u002F1409.4842v1)    |   √   |   √   |     √      |   √  |   √\r\n[Inception V3](http:\u002F\u002Farxiv.org\u002Fabs\u002F1512.00567)     |   ×   |   √   |     √      |   √  |   √\r\n[ResNet V1 50](https:\u002F\u002Farxiv.org\u002Fabs\u002F1512.03385)    |   ×   |   √   |     √      |   o  |   √   |    √\r\n[ResNet V2 152](https:\u002F\u002Farxiv.org\u002Fabs\u002F1603.05027)   |   ×   |   √   |     √      |   √  |   √   |\r\n[VGG 19](http:\u002F\u002Farxiv.org\u002Fabs\u002F1409.1556.pdf)        |   √   |   √   |     √      |   √  |   √   |    √\r\n[MobileNet_v1](https:\u002F\u002Farxiv.org\u002Fpdf\u002F1704.04861.pdf)|   ×   |   √   |     √      | × (No Relu6) |    ×\r\n[Xception]((https:\u002F\u002Farxiv.org\u002Fabs\u002F1610.02357))      |   ×   |   √   |     √      |   ×  |   ×   |\r\n[SqueezeNet](https:\u002F\u002Farxiv.org\u002Fpdf\u002F1602.07360)      |       |   √   |     √      |   √  |   √   |","2017-11-29T13:03:57"]