TensorFlow started (1) Environment Configuration

TensorFlow originally developed by Google brain group (affiliated with Google machine intelligence research institution) researchers and engineers have developed to study machine learning and neural networks for depth, but the versatility of this system is that it can be widely used in other calculations field.
Tensor mean tensor represents N-dimensional array; Flow mean flow, data flow graph represents the calculated based. The N-dimensional digital flow from one end to the process flow diagram of the other end, neural networks, artificial intelligence analysis and processing procedure.

Configuration Environment

This article is a configuration in Windows 10 (1803), Python language as a working language.

Download Anaconda

Anaconda refers to is an open source Python release, which contains conda, Python and more than 180 scientific package and its dependencies, convenient configuration behind us.

Official website , the current latest version Anaconda 5.2 For Windows, use Python 3.6.

After downloading and installing complete we need to be configured.

Configuration Anaconda

After installing Anaconda, will (安装目录)Anaconda3Scriptsjoin the system environment variables Path, the online tutorials and more, here refrain, then our operations should be carried out at the command line.

Administrator rights to open a command line, enter conda -Vor conda --versiondisplay the currently installed version, I have here is 4.5.8, if no error then the above-mentioned variables to correct, then enter conda upgrade --allall upgrade kits, avoid subsequent problems.

Then give Python establish an independent environment, input activate, find more out before the command line (base), which is Anaconda own environment. At this time, if the input pythoncan enter the Anaconda comes with Python environment that is nothing to do with you or without prior installation of Python, but this time enter python -Vyou can see at this time version of python.

Next, create a their own virtual environment, we enter the following code

1
conda create -n tfLearn python=3

Create a name for the virtual environment of tfLearn, python version is python3, you can be refined to python=3.x.x.
We can use

1
conda env list

It lists the name and location of all environments.

At this point we switch to our tfLearn environment with the following statement.

1
activate tfLearn

At this time in front of the command line (base) has varied (tfLearn), it indicates that the handover is successful, the next step we python configuration.

Configuration python

After entering tfLearn environment, we use the following installation tensorFlow.

1
pip install tensorflow-gpu==1.9.0

Note here specifies tensorflow gpu is installed, and the version is 1.9.0, which is to the rear of the supporting CUDA.

If at this time you are not with administrator privileges to install it, at the end of the installation where an error may occur.

Install CUDA and cuDNN

NVIDIA CUDA official website to download
select CUDA 9.0, which is supporting.

NVIDIA official website cuDNN download
select cuDNN v7.1.4 for CUDA 9.0, unzip placed in the root directory of CUDA v9.0 (document folder exactly corresponding).

test environment

Under tfLearn environment into python environment, input

1
import tensorflow as tf

After a short wait, no error message output, the installation is successful, our test environment build better.

Installation jupyter notebook

In Anaconda page, under the Home tab, Applications onswitch to tfLearn environment, the following will be some tools can be installed, we found jupyter notebookclicks install, after click Launch, the browser will open by default http://localhost:8888this is jupyter notebook working environment, but also to be after us the main field of practice.

Anaconda significance

Anaconda is a multi-environment configuration tool, he solve our problems coexistence of different versions of the tool at work.
He achieved this solution is very simple ways, our new working environment at a Anaconda3envslower, opening our tfLearn Documents folder, which is a complete python environment.

# Quote

  1. https://www.jianshu.com/p/eaee1fadc1e9

Original link large column  https://www.dazhuanlan.com/2019/08/16/5d560ab3bcf1b/

Guess you like

Origin www.cnblogs.com/chinatrump/p/11415095.html