程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
您现在的位置: 程式師世界 >> 編程語言 >  >> 更多編程語言 >> Python

Python in-depth learning tensorflow installation and debugging tutorial

編輯:Python

Catalog

Text

One 、 install anaconda

Two 、 install tensorflow

3、 ... and 、 debugging

Text

It's been used for a while caffe after , Yes caffe There are two feelings :1、 It's really fast ; 2、 It's too inflexible .

Deep learning technology has been developing , however caffe The update of can't keep up with the progress , Maybe it's to maintain the team relationship :CAFFE The team members are all maintaining and updating in their spare time . The result is that many new technologies are caffe I can't use it , such as RNN, LSTM,batch-norm etc. . Of course, these are old things now , Maybe caffe Already there. , I haven't paid attention to it for a long time caffe A new version of . Its inflexibility is that new things are difficult to expand by themselves , Only wait for the version to update , It's embarrassing .

therefore , Only to learn caffe A tool seems to be dead , There are other tools to learn . What to learn ? Of course, it is at its zenith tensorflow 了 , After all, the team behind it is very strong , The functions are quite complete , The update is also very timely . The so-called skill does not press the body , To learn the caffe Learn later tensorflow, A combination of the two .

About tensorflow Introduction to , There is no more verbosity here . About gpu Installation and configuration , Nor does it involve .

One 、 install anaconda

tensorflow Is based on python Script language , So you need to install python, Of course, you need to install numpy、scipy、six、matplotlib Wait for dozens of expansion packs . If you install one by one , When will it be installed ?( I used to install scipy Just pretend for a day ...)

But now there is an integrated environment anaconda, The installation is convenient .python Most of the expansion packs for , All integrated in anaconda Inside the , So just install this one thing .

Come first https://www.anaconda.com/products/distribution  download anaconda, The current version has python2.7 Version and python3.5 edition , Download the corresponding version 、 Corresponding to the anaconda, It's actually a sh Script files , about 300M-400M about . Recommended linux Version of python 2.7 edition , because tensorflow Some things in do not support python3.5( Such as cPickle).

After downloading successfully , Execute at the terminal (2.7 edition ):

# bash Anaconda2-4.1.1-Linux-x86_64.sh

perhaps 3.5 edition :

# bash Anaconda3-4.1.1-Linux-x86_64.sh

During the installation , Will ask you the installation path , Just press enter to default . There is a place to ask if you will anaconda The installation path is added to the environment variable (.bashrc) in , This must be entered yes

After successful installation , There will be one in the root directory of the current user anaconda2 Folder , Inside is the installed content . At the terminal, you can input

conda info To query installation information

Input conda list You can query which libraries you have installed now , frequently-used python, numpy, scipy Among them . If you have any packages not installed , Can run

conda install ***   To install (*** Represents the package name ), If a package version is not the latest , function conda update *** That's all right. .

Two 、 install tensorflow

First at the terminal :

anaconda search -t conda tensorflow

Search for tensorflow Installation package , By looking at the version , Choose the highest version to install . For example, I see that it is 0.10.0rc0 The version is the highest , Here's the picture :

therefore , Execute the following code to view the details :

anaconda show jjhelmus/tensorflow

It will tell you , How to install this package , Execute at the terminal :

conda install --channel https://conda.anaconda.org/jjhelmus tensorflow

Then input "y", Installation .

3、 ... and 、 debugging

Installation successful or not , We can test it .

Input... At the terminal python, Get into python Compile environment , Then input :

import tensorflow as tf

Leading package tensorflow package , If no error is reported , Installation succeeded , Otherwise there will be problems .

Then you can type

tf.__version__tf.__path__

see tensorflow Installation version and installation path of ( Two lower horizontal lines on the left and right ).

That's all python Deep learning tensorflow Details of the installation and debugging tutorial , More about tensorflow For installation and debugging information, please pay attention to other relevant articles on the software development network !



  1. 上一篇文章:
  2. 下一篇文章:
Copyright © 程式師世界 All Rights Reserved