Skip to content

Latest commit

 

History

History
 
 

PyTorch-to-CoreML-model-conversion

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

This contains the code for PyTorch to CoreML model conversion. For more information - visit PyTorch to CoreML model conversion

Installation

All required libraries collected in the requirements.txt file. To create a new virtual environment and install the requirements, you can use these commands:

$ virtualenv -p python3.7 venv
$ source venv/bin/activate
$ pip install -r requirements.txt

Run the script

To convert any model from torchvision.models you can try our script by using this command:

$ python3 torch_to_coreml.py --model_name resnet18 --simplify

The --model_name argument should contain the name of any model from torchvision.models

AI Courses by OpenCV

Want to become an expert in AI? AI Courses by OpenCV is a great place to start.