703 introducingcoreml 04 d - apple developer...core ml in depth hall 3 thursday 9:00am accelerate...
TRANSCRIPT
![Page 1: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/1.jpg)
#WWDC17
© 2017 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission from Apple.
Gaurav Kapoor, Core ML Michael Siracusa, Core ML Lizi Ottens, Core ML
•Introducing Core ML
System Frameworks
![Page 2: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/2.jpg)
![Page 3: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/3.jpg)
![Page 4: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/4.jpg)
![Page 5: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/5.jpg)
![Page 6: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/6.jpg)
Personalization Face Detection Emotion Detection
Search Ranking Machine Translation Image Captioning
Real Time Image Recognition Text Prediction Entity Recognition
Speaker Identification Music Tagging Text Summarization
Sentiment Analysis Handwriting Recognition Style Transfer
![Page 7: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/7.jpg)
Personalization Face Detection Emotion Detection
Search Ranking Machine Translation Image Captioning
Real Time Image Recognition Text Prediction Entity Recognition
Speaker Identification Music Tagging Text Summarization
Sentiment Analysis Handwriting Recognition Style Transfer
![Page 8: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/8.jpg)
•Why?
![Page 9: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/9.jpg)
Task Show all images of roses
![Page 10: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/10.jpg)
Task Show all images of roses
// Use color if color == "reddish"
![Page 11: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/11.jpg)
Task Show all images of roses
// Use color if color == "reddish"
// Use shapeif shape == ???
![Page 12: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/12.jpg)
Task Show all images of roses
Machine Learning
![Page 13: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/13.jpg)
Training
![Page 14: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/14.jpg)
Training
+ Labels
Offline
![Page 15: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/15.jpg)
Training
Learning Algorithm
+ Labels
Offline
![Page 16: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/16.jpg)
Training
Learning Algorithm Model
+ Labels
Offline
![Page 17: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/17.jpg)
Inference
Model
![Page 18: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/18.jpg)
Inference
Model
![Page 19: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/19.jpg)
Inference
Label:
Confidence:
Rose 95%
Model
![Page 20: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/20.jpg)
Inference
Challenging!
Label:
Confidence:
Rose 95%
Model
![Page 21: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/21.jpg)
void convolutionLayer(int kernelWidth, int kernelHeight, int inputFeatureChannels, int outputFeatureChannels, int strideX, int strideY, int numRows, int numCols, float* input, float* output, float* weights, int widthPadding, int heightPadding, float alpha, float beta) { memset(output, 0, ((numRows - kernelWidth + 2*widthPadding)/2 + 1) * ((numRows - kernelWidth + 2*widthPadding)/2 + 1)*outputFeatureChannels * sizeof(float)); for (int depthInd = 0; depthInd < outputFeatureChannels; depthInd++) { // loop over input (color) channels for (int colorInd = 0; colorInd < inputFeatureChannels; colorInd++) { int numRowsOut = (numRows - kernelWidth + 2*widthPadding)/strideX + 1; int numColsOut = (numCols - kernelHeight + 2*heightPadding)/strideY + 1; // loop over the pixels of the image for (int i=0; i < numRowsOut; i++) { for(int j=0; j < numColsOut; j++) { // loop over this kernel for(int m=0; m < kernelWidth; m++) { int mm = kernelWidth - 1 - m; for(int n=0; n < kernelHeight; n++) { int nn = kernelHeight - 1 - n; int ii = i + (m - kernelWidth/2); int jj = j + (n - kernelHeight/2); if( ii >= 0 && ii < numRows && jj >= 0 && jj < numCols) float weight = weights[nn + mm * kernelHeight + depthInd * kernelHeight * kernelWidth]; float value = input[jj + ii*numCols + colorInd*numCols*inputFeatureChannels] * weight; output[j + i*numColsOut + depthInd*numColsOut*numColsOut] += value; } } } } } } // loop and apply nonlinearity for (int i = 0; i < ((numRows - kernelWidth + 2*widthPadding)/strideX + 1) * ((numRows - kernelWidth + 2*widthPadding)/strideY + 1) * outputFeatureChannels; i++) { output[i] = alpha*tanh(beta*output[i]); } }
![Page 22: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/22.jpg)
Challenges
Correctness
Performance
Energy Efficiency
![Page 23: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/23.jpg)
•ML Frameworks
![Page 24: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/24.jpg)
ML Frameworks
Your app
![Page 25: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/25.jpg)
ML Frameworks
NLPVision
Your app
NEWDomain Specific Frameworks
![Page 26: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/26.jpg)
ML Frameworks
NLP
Core ML
Vision
Your app
NEW
NEW
Domain Specific Frameworks
ML Framework
![Page 27: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/27.jpg)
ML Frameworks
MPS
NLP
Accelerate
Core ML
Vision
Your app
NEW
NEW
Domain Specific Frameworks
ML Framework
ML Performance Primitives
![Page 28: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/28.jpg)
Vision Framework
Accelerate MPS
Core ML
Vision NLP
Your app
![Page 29: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/29.jpg)
Vision Framework
Accelerate MPS
Core ML
Vision NLP
Your app
Object Tracking
![Page 30: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/30.jpg)
Vision Framework
Accelerate MPS
Core ML
Vision NLP
Your app
Object Tracking Face Detection
![Page 31: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/31.jpg)
Natural Language Processing
Accelerate MPS
Core ML
Vision NLP
Your app
![Page 32: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/32.jpg)
Natural Language Processing
Accelerate MPS
Core ML
Vision NLP
Your app
Pablo y yo ya regresamos de nuestras vacaciones en
Finlandia.
Language Identification
Language: Spanish
Language Identification
![Page 33: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/33.jpg)
Natural Language Processing
Accelerate MPS
Core ML
Vision NLP
Your app
Pablo y yo ya regresamos de nuestras vacaciones en
Finlandia.
Language Identification
Language: Spanish
Language Identification Named Entity Recognition
Place Identified: Finland
Pablo and I are back from Finland
Place Identification
![Page 34: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/34.jpg)
Core ML
Accelerate MPS
Core ML
Vision NLP
Your app
![Page 35: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/35.jpg)
Core ML
Accelerate MPS
Core ML
Vision NLP
Your app
Music Tagging
![Page 36: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/36.jpg)
Core ML
Accelerate MPS
Core ML
Vision NLP
Your app
Music Tagging Image Captioning
![Page 37: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/37.jpg)
Accelerate and MPS
High performance math
Inference for custom ML models
Accelerate MPS
Core ML
Vision NLP
Your app
![Page 38: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/38.jpg)
Run on Device
![Page 39: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/39.jpg)
Run on Device
User Privacy
![Page 40: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/40.jpg)
Run on Device
User Privacy Data Cost
![Page 41: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/41.jpg)
Run on Device
User Privacy Server CostData Cost
![Page 42: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/42.jpg)
Run on Device
User Privacy Always Available
24/7
Server CostData Cost
![Page 43: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/43.jpg)
![Page 44: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/44.jpg)
![Page 45: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/45.jpg)
ML Frameworks
MPS
NLP
Accelerate
Core ML
Vision
Your app
NEW
NEW
Domain Specific Frameworks
ML Framework
ML Performance Primitives
![Page 46: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/46.jpg)
Michael Siracusa, Core ML
•Core ML
![Page 47: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/47.jpg)
•Overview
![Page 48: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/48.jpg)
•Overview•Models
![Page 49: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/49.jpg)
•Overview•Models•Development Flow
![Page 50: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/50.jpg)
•Overview •Models •Development Flow
![Page 51: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/51.jpg)
![Page 52: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/52.jpg)
![Page 53: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/53.jpg)
Focus on the experience you are trying to enable
![Page 54: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/54.jpg)
Simple
![Page 55: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/55.jpg)
PerformantSimple
![Page 56: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/56.jpg)
PerformantSimple Compatible
![Page 57: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/57.jpg)
Unified inference API
Xcode integrationSimple
![Page 58: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/58.jpg)
Fine tuned inference engines
Built on Accelerate and MetalPerformant
![Page 59: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/59.jpg)
Public model format
Support for popular training librariesCompatible
![Page 60: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/60.jpg)
•Overview •Models •Development Flow
![Page 61: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/61.jpg)
Model
Function learned from data
Observed inputs
Predicts outputs
?Model
photo: flowerType:
![Page 62: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/62.jpg)
Underlying Function
Scene Classification Style TransferTranslation
Sentiment Analysis Handwriting Recognition
Music Tagging Predicting Text
![Page 63: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/63.jpg)
Underlying Function
Scene Classification Style TransferTranslation
Sentiment Analysis Handwriting Recognition
Music Tagging Predicting Text
😃That was totally awesome Leo!
I love you mom 사랑해 엄마
7
Do you know the way to San Jose
Beach
Rock
![Page 64: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/64.jpg)
Model Types
Scene Classification Style TransferTranslation
Sentiment Analysis Handwriting Recognition
Music Tagging Predicting Text
![Page 65: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/65.jpg)
Model Types
Scene Classification Style TransferTranslation
Sentiment Analysis Handwriting Recognition
Music Tagging Predicting Text
Convolutional Neural Networks
Feed Forward Neural Networks
Recurrent Neural Networks
Support Vector MachinesTree Ensembles Generalized Linear Models
![Page 66: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/66.jpg)
Focus on Use Cases
Scene Classification Style TransferTranslation
Sentiment Analysis Handwriting Recognition
Music Tagging Predicting Text
![Page 67: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/67.jpg)
Core ML Model
Single document
Public format
CoreML in Depth Hall 3 Thursday 9:00AM
![Page 68: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/68.jpg)
Where do models come from?
![Page 69: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/69.jpg)
Sample Models https://developer.apple.com/machine-learning
Core ML models
Ready to use
Task specific
Explore!
![Page 70: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/70.jpg)
Thriving communities
Popular ML libraries
Many models
Tap Into ML Community
![Page 71: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/71.jpg)
Convert to Core ML
Core ML Tools
![Page 72: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/72.jpg)
Convert to Core ML
Core ML Tools
![Page 73: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/73.jpg)
Convert to Core ML
Core ML Tools
![Page 74: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/74.jpg)
Convert to Core ML
Core ML Tools
Open Source
![Page 75: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/75.jpg)
Convert to Core ML
CoreML in Depth Hall 3 Thursday 9:00AM
Core ML Tools
Open Source
![Page 76: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/76.jpg)
•Overview •Models •Development Flow
![Page 77: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/77.jpg)
Model as Code
![Page 78: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/78.jpg)
Xcode
Model as Code
![Page 79: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/79.jpg)
Xcode
Model as Code
![Page 80: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/80.jpg)
Xcode Your App
Model as Code
![Page 81: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/81.jpg)
Xcode Your App
Model as Code
![Page 82: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/82.jpg)
•Development Flow
Lizi Ottens, Core ML
![Page 83: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/83.jpg)
![Page 84: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/84.jpg)
![Page 85: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/85.jpg)
Getting the Model
![Page 86: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/86.jpg)
Getting the Model
![Page 87: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/87.jpg)
Getting the Model
![Page 88: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/88.jpg)
Getting the Model
Convert
![Page 89: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/89.jpg)
![Page 90: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/90.jpg)
rose
![Page 91: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/91.jpg)
•Demo •Image based flower identifier
![Page 92: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/92.jpg)
•Demo Recap •Image based flower identifier
![Page 93: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/93.jpg)
Demo Recap Xcode integration
![Page 94: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/94.jpg)
Demo Recap Xcode integration
![Page 95: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/95.jpg)
Demo Recap Xcode integration
![Page 96: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/96.jpg)
Demo Recap Xcode integration
![Page 97: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/97.jpg)
Demo Recap Simple usage
let flowerModel = FlowerClassifier() if let prediction = try? flowerModel.prediction(flowerImage: image) { return prediction.flowerType }
![Page 98: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/98.jpg)
Demo Recap Simple usage
let flowerModel = FlowerClassifier() if let prediction = try? flowerModel.prediction(flowerImage: image) { return prediction.flowerType }
Type of model abstracted
![Page 99: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/99.jpg)
Demo Recap Simple usage
let flowerModel = FlowerClassifier() if let prediction = try? flowerModel.prediction(flowerImage: image) { return prediction.flowerType }
Type of model abstracted
Input/output strongly typed
![Page 100: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/100.jpg)
Generated Source
class FlowerClassifierInput { var flowerImage: CVPixelBuffer }
class FlowerClassifierOutput { let flowerType: String let flowerTypeProbs: [String: Double] }
class FlowerClassifier { convenience init() func prediction(flowerImage: CVPixelBuffer) throws -> FlowerClassifierOutput }
![Page 101: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/101.jpg)
Generated Source
class FlowerClassifierInput { var flowerImage: CVPixelBuffer }
class FlowerClassifierOutput { let flowerType: String let flowerTypeProbs: [String: Double] }
class FlowerClassifier { convenience init() func prediction(flowerImage: CVPixelBuffer) throws -> FlowerClassifierOutput }
![Page 102: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/102.jpg)
Generated Source
class FlowerClassifierInput { var flowerImage: CVPixelBuffer }
class FlowerClassifierOutput { let flowerType: String let flowerTypeProbs: [String: Double] }
class FlowerClassifier { convenience init() func prediction(flowerImage: CVPixelBuffer) throws -> FlowerClassifierOutput }
![Page 103: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/103.jpg)
Generated Source
class FlowerClassifierInput { var flowerImage: CVPixelBuffer }
class FlowerClassifierOutput { let flowerType: String let flowerTypeProbs: [String: Double] }
class FlowerClassifier { convenience init() func prediction(flowerImage: CVPixelBuffer) throws -> FlowerClassifierOutput }
![Page 104: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/104.jpg)
More Advanced Underlying API
class FlowerClassifier { convenience init() func prediction(flowerImage: CVPixelBuffer) throws -> FlowerClassifierOutput }
![Page 105: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/105.jpg)
More Advanced Underlying API
class FlowerClassifier { convenience init()
func prediction(flowerImage: CVPixelBuffer) throws -> FlowerClassifierOutput }
![Page 106: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/106.jpg)
More Advanced Underlying API
Programmatic access to model for power users
class FlowerClassifier { convenience init()
let model: MLModel func prediction(flowerImage: CVPixelBuffer) throws -> FlowerClassifierOutput }
![Page 107: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/107.jpg)
class MLModel { var modelDescription: MLModelDescription func prediction(from input: MLFeatureProvider) throws -> MLFeatureProvider }
MLModel
![Page 108: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/108.jpg)
class MLModel { var modelDescription: MLModelDescription func prediction(from input: MLFeatureProvider) throws -> MLFeatureProvider }
MLModel
Access to model description
![Page 109: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/109.jpg)
class MLModel { var modelDescription: MLModelDescription func prediction(from input: MLFeatureProvider) throws -> MLFeatureProvider }
MLModel
Access to model description
Flexibility in how input is provided
![Page 110: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/110.jpg)
Xcode Your App
![Page 111: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/111.jpg)
Xcode Your App
![Page 112: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/112.jpg)
Behind the Scenes Model compilation
![Page 113: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/113.jpg)
Behind the Scenes Model compilation
![Page 114: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/114.jpg)
Behind the Scenes Model compilation
Quick initialization
![Page 115: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/115.jpg)
Behind the Scenes Model compilation
Quick initialization
Optimized prediction
![Page 116: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/116.jpg)
Model Goals
![Page 117: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/117.jpg)
NEWReduce size
Model Goals
![Page 118: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/118.jpg)
NEWReduce size
Improve accuracy
Model Goals
![Page 119: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/119.jpg)
NEWReduce size
Improve accuracy
Decrease prediction times
Model Goals
![Page 120: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/120.jpg)
Summary
![Page 121: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/121.jpg)
Summary
Machine learning frameworks
![Page 122: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/122.jpg)
Summary
Machine learning frameworks
Core ML
![Page 123: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/123.jpg)
Summary
Machine learning frameworks
Core ML
Development flow in action
![Page 124: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/124.jpg)
More Informationhttps://developer.apple.com/wwdc17/703
![Page 125: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/125.jpg)
Related Sessions
Natural Language Processing and your Apps Hall 3 Wednesday 9:00AM
Vision Framework: Building on Core ML Hall 2 Wednesday 3:10PM
Core ML in depth Hall 3 Thursday 9:00AM
Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM
Using Metal 2 for Compute Grand Ballroom A Thursday 4:10PM
![Page 126: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/126.jpg)
Labs
Core ML and Natural Language Processing Lab Technology Lab D Thu 11:00AM-3:30PM
Core ML & Natural Language Processing Lab Technology Lab D Fri 1:50AM-4:00PM
![Page 127: 703 IntroducingCoreML 04 D - Apple Developer...Core ML in depth Hall 3 Thursday 9:00AM Accelerate and Sparse Solvers Executive Ballroom Thursday 10:00AM Using Metal 2 for Compute Grand](https://reader033.vdocuments.us/reader033/viewer/2022060500/5f1aaafaeb6eb8084f770b7d/html5/thumbnails/127.jpg)