那棵树看起来生气了
源码编译TensorFlow with MKLDNN
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
- 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
- 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.
- Download
$ wget -c https://github.com/bazelbuild/bazel/releases/download/0.13.1/bazel-0.13.1-installer-linux-x86_64.sh
- 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.
- Add environment
Add bazel enviroment to .bashrc file.
$ vim ~/.bashrc
add bazel Enviroment
export PATH="$INSTALL_HOME/bazel/bin:$PATH"
$ source ~/.bashrc
Install TensorFlow
- Download TensorFlow source code.
$ git clone https://github.com/tensorflow/tensorflow.git
$ cd tensorflow
- 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
- Generate install package
$ mkdir build_pip_package
$ bazel-bin/tensorflow/tools/pip_package/build_pip_package ./build_pip_package
- 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
- 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
三合一收款
下面三种方式都支持哦
看的我热血沸腾啊
真棒!
你的文章让我心情愉悦,真是太棒了! http://www.55baobei.com/HukYv66NTJ.html
《麦香》国产剧高清在线免费观看:https://www.jgz518.com/xingkong/32968.html
你的文章充满了欢乐,让人忍不住一笑。 https://www.yonboz.com/video/41197.html
《麦香》国产剧高清在线免费观看:https://www.jgz518.com/xingkong/32968.html
你的文章总是能给我带来欢乐,谢谢你! http://www.55baobei.com/SK4nTZpQzJ.html
你的文章总是能给我带来欢乐,谢谢你! http://www.55baobei.com/xtmRPozM7D.html