explaingit

microsoft/mmdnn

5,809PythonAudience · researcherComplexity · 3/5LicenseSetup · moderate

TLDR

MMdnn is a Microsoft toolkit that converts trained AI models between deep learning frameworks like TensorFlow, PyTorch, Keras, and ONNX using a shared intermediate format.

Mindmap

mindmap
  root((mmdnn))
    What it does
      Converts AI models
      Neutral intermediate format
      Generates retraining code
    Tech Stack
      Python
      TensorFlow PyTorch Keras
      ONNX MXNet Caffe
    Use Cases
      Cross-framework deployment
      Model visualization
      Android and TensorRT deploy
    Audience
      ML researchers
      AI engineers
      Data scientists
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Convert a model trained in PyTorch to TensorFlow so it can be deployed with TensorFlow Serving.

USE CASE 2

Visualize the architecture of an unfamiliar neural network model as a diagram before converting it.

USE CASE 3

Deploy a Caffe or Keras model on an Android device after converting it through MMdnn.

USE CASE 4

Download and test popular pre-trained models from MMdnn's model collection in your preferred framework.

Tech stack

PythonTensorFlowPyTorchKerasONNXMXNetCaffeDocker

Getting it running

Difficulty · moderate Time to first run · 30min

Requires the source framework installed alongside MMdnn, Docker image is the easiest path to get all frameworks at once.

MIT license, use freely for any purpose, including commercial, as long as you keep the copyright notice.

In plain English

MMdnn is a Python toolkit from Microsoft that lets you convert trained AI models from one deep learning framework to another. Deep learning frameworks are the software environments that researchers and engineers use to build and train neural networks, and each one saves models in its own file format. MMdnn bridges those gaps so that a model trained in one framework can be loaded and used in a different one. The frameworks it supports include TensorFlow, PyTorch, Keras, MXNet, Caffe, CNTK, CoreML, ONNX, and DarkNet. Conversion works by translating a model into a neutral intermediate format first, and then converting from that format into the target framework. This approach means you do not need a direct path between every possible pair of frameworks. During conversion, MMdnn also generates code snippets to help you retrain or run inference with the converted model. Beyond conversion, MMdnn includes a model visualizer that draws the network architecture as a diagram, which can help you understand the structure of a model you did not originally build. It also has a model collection that points to popular pre-trained models you can download and work with. The tool is installable via pip or through a Docker image that bundles MMdnn together with the supported frameworks. There is also documentation covering how to deploy converted models on Android devices, via TensorFlow Serving, or with TensorRT for faster inference on compatible hardware. MMdnn is a research project from Microsoft and is released under the MIT license. Conversion support varies by framework pair, and the README includes a compatibility table showing which model architectures have been tested between which frameworks.

Copy-paste prompts

Prompt 1
How do I convert a PyTorch model to TensorFlow using MMdnn? Show me the command-line steps.
Prompt 2
What frameworks does MMdnn support for model conversion, and where can I find the compatibility table?
Prompt 3
How do I use MMdnn's model visualizer to draw the architecture of a Keras model as a diagram?
Prompt 4
Show me how to install MMdnn with Docker so I have all supported frameworks available in one environment.
Prompt 5
How do I deploy an MMdnn-converted model with TensorRT for faster inference on an NVIDIA GPU?
Open on GitHub → Explain another repo

← microsoft on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.