Tim M 57b5cefde5 Updated all `.md` files to contain newest image 2 سال پیش
..
README.md 57b5cefde5 Updated all `.md` files to contain newest image 2 سال پیش
requirements.txt 540ce24809 add torch-to-coreml post 4 سال پیش
torch_to_coreml.py 2ff26cfed6 update coreml model test 4 سال پیش

README.md

PyTorch to CoreML model conversion

This repository contains the code for PyTorch to CoreML model conversion blog post.

download

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.