windows installed in the system tensorflow

TensorFlow premise installation of the system is installed Python 2.5 or later, examples tutorial is based on Python 3.5 (Anaconda version 3) based design. To install TensorFlow, first make sure that you have installed the Anaconda. From URL ( https://www.continuum.io/downloads download and install for Windows Anaconda) in.


After installation, the installation can be verified in the window using the following command:

conda --version

Installation of Anaconda, decide whether to install the next version TensorFlow CPU or GPU version. Almost all computers support TensorFlow CPU version, while the GPU version requires that your computer has a CUDA compute capability 3.0 and above NVDIA GPU graphics card (for desktops in terms of minimum configuration NVDIA GTX 650). 

Comparison of CPU and GPU: a central processing unit (CPU) by the kernel process optimized for serial order (4 to 8) components. Graphics processor (GPU) having massively parallel architecture, a smaller and more efficient thousands core (substantially in thousands) composition, capable of simultaneously processing a plurality of tasks.

For TensorFlow GPU version need to install CUDA toolkit 7.0 and above, [R] NVDIA driver and cuDNN v3 or later. Windows system also needs some additional DLL files, readers can download the required DLL files or install Studio Visual  C ++ .

One more thing to keep in mind, cuDNN file to be installed in a different directory, and to ensure that the directory in the system path. Of course, you can copy the CUDA library of relevant documents to the appropriate folder.

TensorFlow install specific practices

  1. Creating conda environment (if you are using Windows, the best execution as an administrator at the command line), use the following command at the command line:

    conda create -n tensorflow python=3.5

  2. Activate conda environment:


     
  3. This command should prompt:


     
  4. According TensorFlow version to be installed in conda environment, enter the following command:

    pip install tensorflow

     
  5. Python input on the command line, and enter the following code:


     
  6. Output is as follows:

  7. Disable conda environment on the command line (Windows calls the deactivate command, MAC / Ubuntu source deactivate call command).

TensorFlow installation process analysis interpretation

Google uses wheel standard distribution TensorFlow, it is .whl suffix ZIP file format. Python 3.6 is the default version of Python Anaconda 3, and there is no wheel installed. At the time of this writing, Python 3.6 supports the wheel only for Linux / Ubuntu, Therefore, when creating TensorFlow environment, here designated Python 3.5. Then the new conda environment, named tensorflow, and install pip, python, wheel and other software packages.

After conda environment is created, call the source activate / activate command to activate the environment. In the activated environment, use pip install command to install the desired TensorFlow (URL downloaded from the corresponding TensorFlow-API). Despite the use of conda forge the Anaconda installation TensorFlow CPU command, but TensorFlow recommended pip install. After installing TensorFlow in conda environment, it can be disabled. You can now perform the first TensorFlow program.

The program is running, you may see some warnings (W) messages and prompts (I) message, and finally outputs the code:

Welcome to the exciting world of Deep Neural Networks!

 

Reprinted from http://c.biancheng.net/view/1881.html

 

Guess you like

Origin www.cnblogs.com/ffrs/p/11008789.html