1. TensorFlow Mobile 簡介
????????TensorFlow Mobile是為Android和iOS等移動平臺設(shè)計的深度學習解決方案。
2. TensorFlow Lite 與 Mobile 對比
TensorFlow Lite是TensorFlow Mobile的進化版。在大多數(shù)情況下,TensorFlow Lite擁有跟小的二進制大小,更少的依賴以及更好的性能。
TensorFlow Lite尚在開發(fā)階段,可能存在一些功能尚未補齊。不過官方承諾正在加大力度開發(fā)。
TensorFlow Lite支持的OP比較有限,相比之下TensorFlow Mobile更加全面(例如風格遷移的一些OP)。
TensorFlow Mobile使用
.pb格式的模型,而TensorFlow Lite使用.tflite格式。
3. 已被Google拋棄
Warning: We expect to deprecate TensorFlow Mobile in early 2019
TensorFlow Lite is our main mobile and embedded offering. We are working hard to close the feature gap between TensorFlow Mobile and TensorFlow Lite. We expect to deprecate TensorFlow Mobile in early 2019. We will give ample notice to our users when we get to that point and will provide help and support to ensure easy migrations.
In the meantime, please use TensorFlow Lite. If you have a feature request, such as a missing op, please post to our GitHub.
4. 選用的原因
- 支持任意尺寸的輸入圖像
- TensorFlow Mobile的OP比Lite全面,無需自定義OP
- 有風格遷移的代碼可以參考:地址
5. 使用指南
????????在Android Studio中添加依賴:
dependencies {
compile 'org.tensorflow:tensorflow-android:+'
}