Skip to content

Tengxu-Sun/pytroch-coreml-custom-layer-example

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pytorch-coreml-custom-layer-example

PyTorch to CoreML: Writing custom layers with Metal

Convert PyTorch model

cd Convert
python3 -m pip install -r requirements.txt
python3 convert.py -o /path/to/output/resulting/mlmodel/file

Run the demo app

Open TorchCoreMLDemo.xcodeproj in Xcode, build and run the app.

Shader

The code of the grid sample Metal-shader is here.

More information about grid sample (warper) algorithm you can find here.

About

PyTorch to CoreML: Writing custom layers with Metal

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Swift 64.2%
  • Python 25.2%
  • Metal 10.6%