• tensorflow移植到ios


    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工程编译运行即可。。。 

  • 相关阅读:
    WannaMine4.0查杀方法
    kthrotlds(WatchDogs变种)查杀方法
    Powershell无文件挖矿查杀方法
    Myking&暗云III病毒查杀方法
    NAT ALG原理与应用
    Invoke-PSImage 使用简介
    Cobaltstrike 安装
    windows 创建、启动、删除、停止服务
    CobaltStrike 之 Attacks 菜单解析
    网络安全法(2016年11月7日发布 2017年6月1日起施行 主席令(第五十三号)公布)
  • 原文地址:https://www.cnblogs.com/mlj318/p/6434924.html
Copyright © 2020-2023  润新知