TypechoJoeTheme

半醉残影

统计

源码编译TensorFlow with MKLDNN

2018-05-14
/
15 评论
/
1,751 阅读
/
正在检测是否收录...
05/14

Install TensorFlow

Operating Systems:

  • Ubuntu* 16.04.3 long-term support (LTS), 64-bit
  • CentOS* 7.4, 64-bit
  • Yocto Project Poky Jethro v2.0.3, 64-bit (for target only)

Install Python Environment

Anaconda includes 250+ popular data science packages and the conda package and virtual environment manager for Windows, Linux, and MacOS. Conda makes it quick and easy to install, run, and upgrade complex data science and machine learning environments like Scikit-learn, TensorFlow, and SciPy. Anaconda Distribution is the foundation of millions of data science projects as well as Amazon Web.

please use root rights

$ su
  1. Download
$ wget -c https://repo.anaconda.com/archive/Anaconda3-5.1.0-Linux-x86_64.sh
$ wget -c https://repo.anaconda.com/archive/Anaconda2-5.3.0-Linux-x86_64.sh
  1. Install Anaconda
$ chmod +x Anaconda3-5.1.0-Linux-x86_64.sh
$ ./Anaconda3-5.1.0-Linux-x86_64.sh
$ source ~/.bashrc

Install Bazel

Bazel is the common build tool. It's necessary to build TensorFlow source code.

  1. Download
$ wget -c https://github.com/bazelbuild/bazel/releases/download/0.13.1/bazel-0.13.1-installer-linux-x86_64.sh
  1. Install
$ chmod +x bazel-0.13.1-installer-linux-x86_64.sh
$ ./bazel-0.13.1-installer-linux-x86_64.sh --prefix=$INSTALL_HOME/bazel

NOTE: "INSTALL_HOME" is your install directory.

  1. Add environment

Add bazel enviroment to .bashrc file.

$ vim ~/.bashrc

add bazel Enviroment

export PATH="$INSTALL_HOME/bazel/bin:$PATH"

$ source ~/.bashrc

Install TensorFlow

  1. Download TensorFlow source code.
$ git clone https://github.com/tensorflow/tensorflow.git
$ cd tensorflow
  1. Build

Choose what you need tools.

$ ./configure

# it may for a long time.
$ bazel build --config=mkl --copt="-DEIGEN_USE_VML" -c opt //tensorflow/tools/pip_package:build_pip_package

$ bazel build --copt=-mavx2 --copt=-mfma --copt=-mavx --copt=-msse4.2 --copt=-msse4.1 --copt=-msse3 --copt="-DEIGEN_USE_VML" -c opt //tensorflow/tools/pip_package:build_pip_package
  1. Generate install package
$ mkdir build_pip_package
$ bazel-bin/tensorflow/tools/pip_package/build_pip_package ./build_pip_package
  1. Install TensorFlow pip package
$ sudo pip install ./build_pip_package/tensorflow-1.8.0-cp36-cp36m-linux_x86_64.whl

NOTE: It may need root rights

  1. Validate
$ python
# input "import tensorflow as tf",it should be have no error.
>>> import tensorflow as tf

End

编译TensorFlow 1.10需要安装如下

pip install keras_applications==1.0.4 --no-deps
pip install keras_preprocessing==1.0.2 --no-deps
pip install h5py==2.8.0

更多详情点击这里

TensorFlowAI深度学习
朗读
赞(0)
赞赏
感谢您的支持,我会继续努力哒!

三合一收款

下面三种方式都支持哦

微信
QQ
支付宝
打开支付宝/微信/QQ扫一扫,即可进行扫码打赏哦
版权属于:

半醉残影

本文链接:

https://blog.dengyb.com/archives/14/(转载时请注明本文出处及文章链接)

评论 (15)
  1. illppfuedk 作者
    Windows 10 · Google Chrome

    看的我热血沸腾啊

    2024-09-23 回复
  2. svmeayjcco 作者
    Windows 10 · Google Chrome

    真棒!

    2024-11-20 回复
  3. ahhhsrcnaa 作者
    Windows 10 · Google Chrome

    你的文章让我心情愉悦,真是太棒了! http://www.55baobei.com/HukYv66NTJ.html

    2024-11-21 回复
  4. lxgxuncwki 作者
    Windows 10 · Google Chrome

    《麦香》国产剧高清在线免费观看:https://www.jgz518.com/xingkong/32968.html

    2024-11-22 回复
  5. krwvutsrzl 作者
    Windows 10 · Google Chrome

    你的文章充满了欢乐,让人忍不住一笑。 https://www.yonboz.com/video/41197.html

    2024-11-25 回复
  6. uoptxknmmj 作者
    Windows 10 · Google Chrome

    《麦香》国产剧高清在线免费观看:https://www.jgz518.com/xingkong/32968.html

    2024-11-26 回复
  7. bpiutsdbaa 作者
    Windows 10 · Google Chrome

    你的文章总是能给我带来欢乐,谢谢你! http://www.55baobei.com/SK4nTZpQzJ.html

    2024-12-03 回复
  8. axykonmljy 作者
    Windows 10 · Google Chrome

    你的文章总是能给我带来欢乐,谢谢你! http://www.55baobei.com/xtmRPozM7D.html

    2024-12-15 回复
  9. ejebrrafma 作者
    Windows 10 · Google Chrome

    既有宏观视野,又兼顾微观细节。

    2025-02-28 回复
  10. gtwwqgzooi 作者
    Windows 10 · Google Chrome

    ?语言类评语?

    2025-03-03 回复
  11. chluabhnmn 作者
    Windows 10 · Google Chrome

    文章结构紧凑,层次分明,逻辑严密,让人一读即懂。

    2025-03-04 回复
  12. fjtmgiqict 作者
    Windows 10 · Google Chrome

    这篇文章不错!

    2025-03-07 回复
  13. 华纳东方明珠客服电话是多少?(▲18288362750?《?微信STS5099? 】【╃q 2704132802╃】
    华纳东方明珠开户专线联系方式?(▲18288362750?《?微信STS5099? 】【╃q 2704132802╃】
    如何联系华纳东方明珠客服?(▲18288362750?《?微信STS5099? 】【╃q 2704132802╃】
    华纳东方明珠官方客服联系方式?(▲18288362750?《?微信STS5099? 】【╃q 2704132802╃】
    华纳东方明珠客服热线?(▲18288362750?《?微信STS5099? 】【╃q 2704132802╃】
    华纳东方明珠开户客服电话?(▲182(▲18288362750?《?微信STS5099? 】【╃q 2704132802╃】
    华纳东方明珠24小时客服电话?(▲18288362750?《?微信STS5099? 】【╃q 2704132802╃】
    华纳东方明珠客服邮箱?(▲18288362750?《?微信STS5099? 】【╃q 2704132802╃】
    华纳东方明珠官方客服在线咨询?(▲18288362750?《?微信STS5099? 】【╃q 2704132802╃】
    华纳东方明珠客服微信?(▲18288362750?《?微信STS5099? 】【╃q 2704132802╃】

    2025-11-01 回复
  14. 果博东方客服开户联系方式【182-8836-2750—】?薇- cxs20250806】
    果博东方公司客服电话联系方式【182-8836-2750—】?薇- cxs20250806】
    果博东方开户流程【182-8836-2750—】?薇- cxs20250806】
    果博东方客服怎么联系【182-8836-2750—】?薇- cxs20250806】

    2025-11-09 回复
  15. 东方明珠客服开户联系方式【182-8836-2750—】?μ- cxs20250806
    东方明珠客服电话联系方式【182-8836-2750—】?- cxs20250806】
    东方明珠开户流程【182-8836-2750—】?薇- cxs20250806】
    东方明珠客服怎么联系【182-8836-2750—】?薇- cxs20250806】

    2025-11-10 回复

人生倒计时

今日已经过去小时
这周已经过去
本月已经过去
今年已经过去个月

最新回复

  1. 鍗庣撼鍏徃鍚堜綔寮€鎴锋墍闇€鏉愭枡锛熺數璇濆彿鐮?5587291507 寰俊STS5099
    2025-11-24
  2. 鍗庣撼鍏徃鍚堜綔寮€鎴锋墍闇€鏉愭枡锛熺數璇濆彿鐮?5587291507 寰俊STS5099
    2025-11-24
  3. 鍗庣撼鍏徃鍚堜綔寮€鎴锋墍闇€鏉愭枡锛熺數璇濆彿鐮?5587291507 寰俊STS5099
    2025-11-24
  4. 鍗庣撼鍏徃鍚堜綔寮€鎴锋墍闇€鏉愭枡锛熺數璇濆彿鐮?5587291507 寰俊STS5099
    2025-11-22
  5. 鍗庣撼鍏徃鍚堜綔寮€鎴锋墍闇€鏉愭枡锛熺數璇濆彿鐮?5587291507 寰俊STS5099
    2025-11-22

标签云