or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Syncing
xxxxxxxxxx
Running TFLite on Your Mobile Devices - Koan-Sin Tan
tags:
COSCUP2020
入門
TR212
歡迎來到 https://hackmd.io/@coscup/2020 共筆
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →點擊本頁上方的 開始用 Markdown 一起寫筆記!
手機版請點選上方 按鈕展開議程列表。
Slide Link
Mobile -> IOT device
“There is an old network saying: Bandwidth problems can be cured with money. Latency problems are harder because the speed of light is fixed — you can't bribe God.” – David D. Clark
TFLite actually has two main parts
• interpreter: loads and runs a model on various hardware
• converter: converts TF models to a TFLite specific format to be used by the interpreter.
introduction materials
See https://www.tensorflow.org/lite/guide for more introduction materials
Language
There is a good guide on how to load a model and do inference on devices using TFLite interpreter, in Java(Android), Swift(IOS), Objective-C, C++, and Python
• https://www.tensorflow.org/lite/guide/inference
Metadata
In TFLite metadata, there are three parts in the schema:
• Model information
• Input information
• Output information
Supported Input / Output types
• Feature
• Image
• Bounding box
Pack the associated files, e.g., label file(s)
Normalization and quantization parameters
With example at here, we can create a image classifier with
• image input
• label output
Test TFLite metadata and codegen
https://github.com/freedomtan/CameraxTFLite
“A TensorFlow Lite delegate is a way to delegate part or all of graph execution to another executor.”
Flashback: COSCUP 2019 slide
how NNAPI and GPU delegates work, https://www.slideshare.net/kstan2/tflite-nnapi-and-gpu-delegates
XNNPACK: Paper
Concluding remarks
• nope, there is no iOS code generator (yet)
• note that not all accelerators are created equal
• some are fp only; some are int/quant only
The note is written by Simon