TypechoJoeTheme

半醉残影

统计

源码编译TensorFlow with MKLDNN

2018-05-14
/
0 评论
/
1,090 阅读
/
正在检测是否收录...
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/(转载时请注明本文出处及文章链接)

评论 (0)

人生倒计时

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

最新回复

  1. 搭建自用导航网站 R11; JKblog
    2022-03-10
  2. JK
    2022-01-13

    {!{data:image/webp;base64,UklGRhwNAABXRUJQVlA4WAoAAAAwAAAAAQMAKwEASUNDUBgCAAAAAAIYAAAAAAQwAABtbnRyUkdCIFhZWiAAAAAAAAAAAAAAAABhY3NwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAA9tYAAQAAAADTLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlkZXNjAAAA8AAAAHRyWFlaAAABZAAAABRnWFlaAAABeAAAABRiWFlaAAABjAAAABRyVFJDAAABoAAAAChnVFJDAAABoAAAAChiVFJDAAABoAAAACh3dHB0AAAByAAAABRjcHJ0AAAB3AAAADxtbHVjAAAAAAAAAAEAAAAMZW5VUwAAAFgAAAAcAHMAUgBHAEIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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WX2JAqZ5n3sBi9L0LJI+8MSqGzWgzrxhK5q3IesD43pNmNBf4d7pGTs0AsIOPquuzi82oV76kNKJxC/Z+pZF0a4XeQQcszOSw5x5R+YRcAwovkkrE7H/xtzXb9Y4Lvfg2bl9gK7zks9fnz+Ijq2I/mVlpzD8b/jf8L/hf8P/hv8N/xv+/6/7AFZQOCDSAQAAUDUAnQEqAgMsAT9xuNlltK8rpyAIApAuCWlu4XdhG0AJ7APfbJyHvtk5D32ych77ZOQ99snIe+2TkPfbJyHvtk5D32ych77ZOQ99snIe+2TkPfbJyHvtk5D32ych77ZOQ99snIe+2TkPfbJyHvtk5D32ych77ZOQ99snIe+2TkPfbJyHvtk5D32ych77ZOQ99snIe+2TkPfbJyHvtk5D32ych77ZOQ99snIe+2TkPfbJyHvtk5D32ych77ZOQ99snIe+2TkPfbJyHvtk5D32ych77ZOQ99snIe+2TkPfbJyHvtk5D32ych77ZOQ99snIe+2TkPfbJyHvtk5D32ych77ZOQ99snIe+2TkPfbJyHvtk5D32ych77ZOQ99snIe+2TkPfbJyHvtk5D32ych77ZOQ99snIe+2TkPfbJyHvtk5D32ych77ZOQ99snIe+2TkPfbJyHvtk5D32ych77ZOQ99snIe+2TkPfbJyHvtk5D32ych77ZOQ99snIe+2TkPfbJyHvtk5D32ych77ZOQ99snIe+2TkPfbJyHvtk5D32ych77ZOQ99snIe+2TkPfbJwoAAP7/rR4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==}!}

  3. 搭建自用导航网站 R11; JKblog
    2022-01-12
  4. 搭建自用导航网站 R11; JKblog
    2022-01-12
  5. MrGao
    2019-09-03

标签云