├── .gitignore ├── SplitModel.pt ├── SplitModel.proto ├── SplitModel.mlmodel ├── test-ui ├── index.html ├── tsconfig.json ├── package.json ├── regression.ts └── main.tsx ├── README.md ├── prediction.json ├── ios ├── SplitBridge.m └── Split.swift ├── predict.py ├── Makefile ├── train.py └── data.json /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | yarn.lock 3 | /env 4 | .cache 5 | dist 6 | -------------------------------------------------------------------------------- /SplitModel.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/steadicat/pytorch-coreml-example/HEAD/SplitModel.pt -------------------------------------------------------------------------------- /SplitModel.proto: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/steadicat/pytorch-coreml-example/HEAD/SplitModel.proto -------------------------------------------------------------------------------- /SplitModel.mlmodel: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/steadicat/pytorch-coreml-example/HEAD/SplitModel.mlmodel -------------------------------------------------------------------------------- /test-ui/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |
5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | PyTorch and CoreML example 2 | ========================== 3 | 4 | Companion code to the blog post: [How I Shipped a Neural Network on iOS with CoreML, PyTorch, and React Native](https://attardi.org/pytorch-and-coreml). -------------------------------------------------------------------------------- /test-ui/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es6", 4 | "noEmit": true, 5 | "jsx": "react", 6 | "moduleResolution": "node", 7 | "strict": true, 8 | "noUnusedLocals": true, 9 | "noUnusedParameters": true, 10 | "lib": ["es2015", "dom", "es2016"], 11 | "types": [] 12 | }, 13 | } -------------------------------------------------------------------------------- /prediction.json: -------------------------------------------------------------------------------- 1 | [[3], [4, 7, 12], [5], [], [], [], [], [], [0, 4], [1, 2, 4], [], [2, 5], [3], [5], [], [], [], [6], [5, 10, 15], [], [5], [1, 4, 6, 12, 14], [3, 7, 11], [3, 7, 14, 20], [10, 13], [2, 5, 11, 15, 19], [], [2], [2], [], [3], [1], [3], [6, 9, 13], [1], [2], [], [], [2], [], [], [1, 5, 8, 10], [3, 7], [8], [4], [0, 2, 5, 9], [], [6, 9], [3, 7, 11], [], [], [5, 20], [], [3, 5, 9, 13, 17], [1, 4, 5, 8], [], [7], [2, 3, 6, 7], [3, 5, 7], [2], [5, 7], [11, 19], [7], [], [9], [5], [3, 7], [8], [5, 16], [3], [], [], [2], [3, 8, 12], [3, 7], [5, 8], [13], [5], [12], [21, 35], [16, 31], [6, 15, 16], [16, 24, 31, 33], [8], [], [], [11, 21, 32]] -------------------------------------------------------------------------------- /test-ui/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pytorch-coreml-example", 3 | "version": "1.0.0", 4 | "description": "Companion code to the blog post at https://attardi.org/pytorch-and-coreml", 5 | "main": "n/a", 6 | "repository": "https://github.com/steadicat/pytorch-and-coreml", 7 | "author": "Stefano J. Attardi