Welcome to the Model Converter section of the AI Toolkit. This tool simplifies the process of converting machine learning models between popular frameworks and formats.

Key Features 🚀

  • Framework Conversion: Convert models between TensorFlow, PyTorch, and ONNX.
  • Format Support: Handles .pb, .pt, .h5, and .onnx files seamlessly.
  • API Integration: Easily embeddable in your projects with minimal code.

How to Use 📝

  1. Install the Toolkit:
    pip install ai_toolkit[model_converter]  
    
  2. Load Your Model:
    from ai_toolkit.model_converter import ModelConverter  
    converter = ModelConverter("path/to/your/model.pb")  
    
  3. Convert the Model:
    converter.convert("TensorFlow_PyTorch")  # or "ONNX_PT_PB"  
    

Supported Formats 📁

Source Target Description
.pb .pt Convert TensorFlow SavedModel to PyTorch format
.h5 .onnx Export Keras models to ONNX
.onnx .pb Import ONNX models into TensorFlow

For advanced usage, check out our Model Converter Guide.

TensorFlow_PyTorch
ONNX_PT_PB

Need help? Explore our FAQ page for common issues.