Tensorflow不同环境的安装

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/mandagod/article/details/87930246
  • 使用 pip 安装 TensorFlow

        官网介绍:https://www.tensorflow.org/install/pip

  • Docker镜像安装

       官网介绍:https://www.tensorflow.org/install/docker

  • 安装Anaconda开发工具

      介绍:https://www.anaconda.com/distribution/

      Anaconda集成了Spyder编辑器和jupter可以方便开发使用。

  • 通过Tensorflow源代码安装

     官网介绍:https://www.tensorflow.org/install/source

     主要是把Tensorflow编译成pip软件包,通过上面所介绍的三种方式进行安装即可。

  • TensorFlow Android NDK编译

      https://yq.aliyun.com/articles/608715?utm_content=m_1000005455

      https://blog.csdn.net/ritterliu/article/details/81189563

     编译产生so和jar库文件:

bazel build --cxxopt='--std=c++11' //tensorflow/lite/java:tensorflowlite --crosstool_top=//external:android/crosstool \
--host_crosstool_top=@bazel_tools//tools/cpp:toolchain --cpu=armeabi-v7a

    (同样的编译,https://blog.csdn.net/omnispace/article/details/79788598

      Android Demo App 通过Bazel进行源码编译:

      https://www.tensorflow.org/lite/demo_android   网上有人反馈有坑,在python2环境下验证之后可以正常编译。

      TF Lite Android APP通过Bazel进行源代码编译:

      https://github.com/tensorflow/tensorflow/tree/master/tensorflow/examples/android

猜你喜欢

转载自blog.csdn.net/mandagod/article/details/87930246