tensorflow移植到ios
2024-08-31 03:20:37
1.git clone到本地
git clone https://github.com/tensorflow/tensorflowxcode
2.compile static library
安装xcode command line: xcode-select --install
安装依赖包: brew install automake brew install libtool
安装automake时,autoconf下载失败,自己编译安装.
cd autoconf-2.65
./configure --prefix=/usr/local
make
sudo make install
autoconf -V autoconf编译安装后,brew依然卡在下载autoconf.
参考:http://blog.csdn.net/x32sky/article/details/42710063 同样自己编译安装和libtool
automake --version
下载graph:
mkdir -p ~/graphs curl -o ~/graphs/inception.zip https://storage.googleapis.com/download.tensorflow.org/models/inception5h.zip unzip ~/graphs/inception.zip -d ~/graphs/inception
使用curl下载太慢,直接输入网址下载,解压后文件夹改名为inception.
3.一键编译
tensorflow/contrib/makefile/build_all_ios.sh
下载dependencies时可能比较慢,等等就好。也可以自己下载后放到tensorflow/contrib/makefile/downloads下,
各目录名字为eigen、gemmlowp、googletest、protobuf、re2
最终在 tensorflow/contrib/makefile/gen/lib/ 下生成.a文件
TensorFlow iOS Examples流程
1.~/graphs/inception已经下好,copy到ios_examples
cp ~/graphs/inception/* tensorflow/contrib/ios_examples/benchmark/data/
cp ~/graphs/inception/* tensorflow/contrib/ios_examples/camera/data/
cp ~/graphs/inception/* tensorflow/contrib/ios_examples/simple/data/
打开xcode工程编译运行即可。。。
最新文章
- Java:方法的参数是传值还是传引用
- reconnectingwebsocket.js
- CentOS 静态IP设置
- [转载]jQuery诞生记-原理与机制
- 自己画WinForm 皮肤包括默认控件
- Learning note for Binding and validation
- iOS textfield限制长度,中文占2字符,英文占1字符
- VS单元测试入门实践教程
- db2 for linux
- [置顶] ※数据结构※→☆线性表结构(list)☆============单向链表结构(list single)(二)
- ASP.NET jQuery 随笔 使用jQuery UI的Autocomplete方法实现文本框的自动搜索填充功能
- the c programing language 学习过程8
- [LeetCode] Department Highest Salary -- 数据库知识(mysql)
- Oracle 25用户的权限管理
- MySQL 之 库操作
- mysql常用优化参数
- WCF trace、log
- Windows:chm 文件打开出现“已取消到该网页的导航”的解决方案
- CSUOJ 1087 就多了两分钟
- sdc-docker