Tensorflow built in the windows environment

tensorflow 1.0 after the beginning of support for the windows platform, today to talk about how to quickly build tensorflow development environment in a windows environment


1. We need to first download the anaconda, which is a Python distribution for scientific computing. Meanwhile tensorflow official documents also support the use of this, to build environment. You can choose according to need or use python2.X python3.X. ( Https://www.continuum.io/downloads )


2. In order to facilitate our development, you need to download a tool ide, here I choose pycharm. ( Https://www.jetbrains.com/pycharm/ )


3. After installing pycharm, you need him to create a new empty project. When creating a new project you will find python I built the project using a 3.6. Of course, you may download the anaconda install a more recent version of python. But note that now tensorflow only support python3.5.x, so this version of python can not be used. You can ( https://www.tensorflow.org/install/install_windows see the latest version currently supported by this site needs over the wall) at


4. After the completion of the new project, you need to develop terminal editor, arrived here we can start by downloading command what we need.



5. Input Editor: Conda 3.5.2 Create = -n tensorflow Python. After the completion of the input is determined, as shown below will appear, you need to select proceed intermediate y



6. After the download is complete we need to enter activate tensorflow, enter the command mode tensorflow



7.然后我们就可以根据需要下载cpu 或者 gpu 版本tensorflow,命令分别为


cpu:

pip install --ignore-installed --upgrade https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow-1.1.0-cp35-cp35m-win_amd64.whl

gpu:

pip install --ignore-installed --upgrade https://storage.googleapis.com/tensorflow/windows/gpu/tensorflow_gpu-1.1.0-cp35-cp35m-win_amd64.whl

注:gpu版本需要额外用cuda和cudnn。

在安装完cuda后,只需要把cudnn中的文件拷贝到C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0下即可,其中包括lib,include,bin



8。到这里基本就所以操作就做完了,之后我们需要把当前的项目引用的python修改成我们下的3.5.2



9.在完成后,我们还需要下载一些包,需要什么包都可以从这里下载,记住下载的tensorflow一定是1.1.0版,其他版本可能会出错。每个版本需要对应的python支持,如果是gpu版需要下tensorflow-gpu


10.在做完这些操作后,我们就完成对项目配置,可以进行tensorflow开发了。




发布了48 篇原创文章 · 获赞 17 · 访问量 5万+

Guess you like

Origin blog.csdn.net/aixinaxc/article/details/72474272