What’s New in Core ML, Part 2

WWDC 2018

Posted by Den on August 23, 2018 · 8 mins read
What’s New in Core ML, Part 2

What’s New in Core ML, Part 2

WWDC 2018

What’s New in Core ML, Part 2

WWDC 2018

How to Get a model

Core ML Tools

TensorFlow Converter

ONNX Converter

Core ML Tools 2.0

Quantization Utilities

Quantization

Weight Quantization

Quantization concept
Linear Quantization ( 3 bit )
Lookup Table Quantization ( 3 bit )

Quantization Utilities

  • Decide on precision and algorithm
  • Let Core ML Tools work its magic!

Demo

Execute Jupyter
Linear Quantization
Original vs Linear quantized
Lookup Table Quantization
Original vs LoockUpTable quantized
Save (5 MB → 1.3 MB)

Model Size Versus Agreement

  • Metrics
    - Accuracy
    - Signal-to-noise ratio
    - Visual inspection
    - Model-specific metrics

Custom Conversion

Model Conversion

Custom Layer Examples

Custom activation Layer

Demo

Execute Jupyter
Convert failed! We need a custom layer
Make a custom layer
CoreML Graph Visualization
Save
You have to implement a custom class

Custom Model