# microsoft/mmdnn

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/microsoft-mmdnn).**

5,804 stars · 958 forks · Python · MIT

## Links

- GitHub: https://github.com/Microsoft/MMdnn
- awesome-repositories: https://awesome-repositories.com/repository/microsoft-mmdnn.md

## Description

MMdnn is a deep learning model converter and migrator designed to translate neural network architectures and weights between different frameworks such as TensorFlow, PyTorch, and Keras. It utilizes a standardized intermediate representation to decouple network structures and weights from specific framework implementations, enabling the transformation of pre-trained models across different environments.

The project distinguishes itself by generating native Python reconstruction code from its intermediate representations, allowing models to be rebuilt and fine-tuned in target environments. It also includes specialized tools for mobile model deployment, transforming deep learning models into mobile-compatible formats like CoreML and TensorFlow Lite.

The system provides a broader suite of capabilities including neural network architecture visualization for inspecting graph structures and metadata, as well as model inference execution to validate that converted models maintain original behavior and accuracy. Additional utilities handle the retrieval of pre-trained weights from remote repositories and the assembly of deployable model checkpoints.

## Tags

### Artificial Intelligence & ML

- [Model Intermediate Representations](https://awesome-repositories.com/f/artificial-intelligence-ml/model-intermediate-representations.md) — Uses a standardized intermediate representation to decouple model structures from specific deep learning framework implementations.
- [Model Migrators](https://awesome-repositories.com/f/artificial-intelligence-ml/model-training-frameworks/model-migrators.md) — Migrates pre-trained neural network architectures and weights between different frameworks like TensorFlow, PyTorch, and Keras. ([source](https://github.com/Microsoft/MMdnn/blob/master/mmdnn/conversion/onnx/README.md))
- [Architecture Code Generation](https://awesome-repositories.com/f/artificial-intelligence-ml/code-snippets/architecture-code-generation.md) — Generates native Python reconstruction scripts to rebuild and fine-tune neural network structures in target frameworks.
- [Cross-Framework Model Conversion](https://awesome-repositories.com/f/artificial-intelligence-ml/cross-framework-model-conversion.md) — Translates neural network architectures and weights between different machine learning frameworks. ([source](https://github.com/Microsoft/MMdnn/blob/master/mmdnn/conversion/caffe/README.md))
- [Deep Learning Model Converters](https://awesome-repositories.com/f/artificial-intelligence-ml/deep-learning-model-converters.md) — Translates neural network architectures and weights between different frameworks like TensorFlow, PyTorch, and Keras.
- [Model-to-Code Generators](https://awesome-repositories.com/f/artificial-intelligence-ml/model-training/model-exporting/model-to-code-generators.md) — Generates executable native Python source code from model representations to enable rebuilding and fine-tuning in target frameworks. ([source](https://github.com/Microsoft/MMdnn/blob/master/docs/keras2cntk.md))
- [Model Binary Assembly](https://awesome-repositories.com/f/artificial-intelligence-ml/model-weight-reconstruction/model-binary-assembly.md) — Assembles binary model files by combining architecture definitions and weight data for target environments. ([source](https://github.com/Microsoft/MMdnn/blob/master/mmdnn/conversion/cntk/README.md))
- [Model Reconstruction Tools](https://awesome-repositories.com/f/artificial-intelligence-ml/model-weight-reconstruction/model-reconstruction-tools.md) — Provides utilities to assemble functional deployable models by combining generated source code with corresponding weight files. ([source](https://github.com/Microsoft/MMdnn/blob/master/mmdnn/conversion/pytorch/README.md))
- [CoreML Model Generation](https://awesome-repositories.com/f/artificial-intelligence-ml/coreml-model-generation.md) — Transforms neural network architectures and weights from other frameworks into the CoreML format for Apple platform deployment. ([source](https://github.com/Microsoft/MMdnn/blob/master/mmdnn/conversion/coreml/README.md))
- [Inference Model Deployment](https://awesome-repositories.com/f/artificial-intelligence-ml/inference-model-deployment.md) — Converts models from high-level frameworks into optimized compute graphs for hardware execution and deployment. ([source](https://github.com/microsoft/mmdnn#readme))
- [Inference Verification](https://awesome-repositories.com/f/artificial-intelligence-ml/machine-learning/infrastructure/model-inference-serving/model-integration-pipelines/model-inference/inference-verification.md) — Runs image inference tests on converted models to validate that the output results match the original model. ([source](https://github.com/Microsoft/MMdnn/blob/master/mmdnn/conversion/coreml/README.md))
- [Computational Graph Visualizers](https://awesome-repositories.com/f/artificial-intelligence-ml/machine-learning/infrastructure/model-optimization-and-inference/computational-graph-visualizers.md) — Inspects model meta files and graph structures to identify node names and network topology. ([source](https://github.com/Microsoft/MMdnn/blob/master/mmdnn/conversion/tensorflow/README.md))
- [Model Architecture Visualizations](https://awesome-repositories.com/f/artificial-intelligence-ml/model-architecture-visualizations.md) — Renders the structural layout and layer connectivity of deep learning models graphically for inspection. ([source](https://github.com/Microsoft/MMdnn/blob/master/mmdnn/conversion/mxnet/README.md))
- [Model Checkpoints](https://awesome-repositories.com/f/artificial-intelligence-ml/model-checkpoints.md) — Generates native framework checkpoint files from converted code and weights for direct model loading. ([source](https://github.com/Microsoft/MMdnn/blob/master/mmdnn/conversion/mxnet/README.md))
- [Model Inference Execution](https://awesome-repositories.com/f/artificial-intelligence-ml/model-inference-execution.md) — Provides capabilities to run inference on converted model code to generate predictions or intermediate layer outputs. ([source](https://github.com/Microsoft/MMdnn/blob/master/mmdnn/conversion/darknet/README.md))
- [Model Integrity Validators](https://awesome-repositories.com/f/artificial-intelligence-ml/model-inference-execution/model-integrity-validators.md) — Includes tools for executing inference tests on transformed models to verify that output consistency is preserved. ([source](https://github.com/Microsoft/MMdnn/blob/master/mmdnn/conversion/coreml/README.md))
- [Retraining Snippets](https://awesome-repositories.com/f/artificial-intelligence-ml/model-training/model-exporting/model-to-code-generators/retraining-snippets.md) — Generates code snippets during the conversion process to simplify the fine-tuning or inference of migrated models. ([source](https://github.com/microsoft/mmdnn#readme))
- [Decoupled Weight-Architecture Management](https://awesome-repositories.com/f/artificial-intelligence-ml/model-weight-management/weight-transformations/decoupled-weight-architecture-management.md) — Separates neural network structural definitions from binary weight data to allow independent transformation and reconstruction.
- [Neural Network Visualizations](https://awesome-repositories.com/f/artificial-intelligence-ml/neural-network-visualizations.md) — Generates graphical representations of neural network architectures and topologies to diagnose network structures.
- [Graph Structure Inspection](https://awesome-repositories.com/f/artificial-intelligence-ml/pytorch-model-export/computational-graph-exports/graph-structure-inspection.md) — Analyzes and renders the internal graph representations of models to inspect network nodes and connections.
- [Weight Serialization](https://awesome-repositories.com/f/artificial-intelligence-ml/weight-reconstruction/weight-serialization.md) — Packages model architecture and weight data into binary files for efficient execution on target hardware. ([source](https://github.com/Microsoft/MMdnn/blob/master/docs/keras2cntk.md))

### DevOps & Infrastructure

- [Native Framework Reconstructions](https://awesome-repositories.com/f/devops-infrastructure/deployment-management/model-export-formats/multi-format-exporters/native-framework-reconstructions.md) — Synthesizes original framework-specific model binaries by combining generated architecture code and binary weight data. ([source](https://github.com/Microsoft/MMdnn/blob/master/mmdnn/conversion/tensorflow/README.md))
- [Conversion Verifications](https://awesome-repositories.com/f/devops-infrastructure/model-conversion/conversion-verifications.md) — Runs a converted model against sample data to confirm the migration preserved original behavior. ([source](https://github.com/Microsoft/MMdnn/blob/master/mmdnn/conversion/darknet/README.md))
- [Keras](https://awesome-repositories.com/f/devops-infrastructure/model-conversion/keras.md) — Transforms pre-trained Keras model files into compatible network code and weight files. ([source](https://github.com/Microsoft/MMdnn/blob/master/docs/keras2cntk.md))
- [Conversion Validations](https://awesome-repositories.com/f/devops-infrastructure/model-conversion/tensorflow/cross-framework-model-conversion/conversion-validations.md) — Runs inference tests on converted models to verify that the migration preserved the original behavior and accuracy.
- [Darknet Converters](https://awesome-repositories.com/f/devops-infrastructure/model-conversion/tensorflow/cross-framework-model-conversion/darknet-converters.md) — Translates neural network architectures and weights from the Darknet framework into standardized intermediate formats. ([source](https://github.com/Microsoft/MMdnn/blob/master/mmdnn/conversion/darknet/README.md))

### Mobile Development

- [Mobile Model Deployment](https://awesome-repositories.com/f/mobile-development/mobile-model-deployment.md) — Converts deep learning models into optimized formats like CoreML for execution on mobile devices.
- [Mobile Model Format Converters](https://awesome-repositories.com/f/mobile-development/mobile-model-format-converters.md) — Transforms deep learning models into mobile-compatible formats like CoreML and TensorFlow Lite.

### Programming Languages & Runtimes

- [IR to Model Code Translation](https://awesome-repositories.com/f/programming-languages-runtimes/intermediate-representation-translation/ir-to-model-code-translation.md) — Translates standardized intermediate representations into executable framework-specific Python code. ([source](https://github.com/Microsoft/MMdnn/blob/master/mmdnn/conversion/darknet/README.md))
- [Model IR Translations](https://awesome-repositories.com/f/programming-languages-runtimes/intermediate-representation-translation/model-ir-translations.md) — Translates CoreML checkpoint files into a standardized intermediate representation of architecture and weight files. ([source](https://github.com/Microsoft/MMdnn/blob/master/mmdnn/conversion/coreml/README.md))
- [Intermediate Representations](https://awesome-repositories.com/f/programming-languages-runtimes/machine-code-generation/intermediate-representations.md) — Parses model files into a framework-neutral intermediate representation to facilitate visualization and conversion. ([source](https://github.com/Microsoft/MMdnn/blob/master/docs/tf2pytorch.md))
- [Model Architecture Code Generators](https://awesome-repositories.com/f/programming-languages-runtimes/machine-code-generation/intermediate-representations/model-architecture-code-generators.md) — Generates native framework architecture and weight files from intermediate model representations via Python code snippets. ([source](https://github.com/Microsoft/MMdnn/blob/master/mmdnn/conversion/caffe/README.md))
- [Model Serialization](https://awesome-repositories.com/f/programming-languages-runtimes/json-serialization/model-serialization.md) — Packages model architectures and weights into portable, framework-neutral binary formats for consistent deployment.

### Software Engineering & Architecture

- [Pluggable Framework Converters](https://awesome-repositories.com/f/software-engineering-architecture/pluggable-backends/pluggable-framework-converters.md) — Employs a modular system of converters to map layers and operations from source frameworks to target equivalents.

### Part of an Awesome List

- [Model Conversion and Interoperability](https://awesome-repositories.com/f/awesome-lists/ai/model-conversion-and-interoperability.md) — Cross-framework tool to convert and visualize deep learning models.
- [Model Conversion](https://awesome-repositories.com/f/awesome-lists/devtools/model-conversion.md) — Facilitates interoperability between different deep learning frameworks.
