-
-
-
- Installing Theano
- Configuring the GPU
"Original" Liu_longpo
Reprint Please specify the source "CSDN" http://blog.csdn.net/llp1992
Installing Theano
This post is an experience and I hope to help those who have struggled with me.
Already said, non-root users, so can not use sudo, only this series of trouble.
To install Theano, you need some dependencies, and you can refer to the blog for details:
Deeplearning (i) Best environment collocation and entry information
If there is no root authority, the source of the installation of this large pile of things is quite troublesome.
Fortunately, there is such a tool called Anaconda, it has built up a lot of Python library, after installing the Anaconda only need to install Theano can
Anaconda Download Link
Select the corresponding system version, for example I am: anaconda-2.3.0-linux-x86_64.sh
After downloading, install with sh command. Typically installed by default in the home directory, next we will install Theano, similarly, according to this blog post:
Deeplearning (i) Best environment collocation and entry information
Provide the Theano source code, download link, download after the decompression. We installed using Anaconda python instead of system Python and now add Anaconda python to the environment variable:
export PATH="/home/.../anaconda/bin:$PATH"
Then enter the extracted Theano directory and run
python setup.py install
The Theano and other plugins are now installed.
At the same time, the Anaconda Python IDE, the Spyder is also very handy.
Configuring the GPU
Here the default has been installed Cuda,cuda the installation of many online tutorials, but also a variety of, because the server has been installed Cuda, the installation process I have omitted.
When configuring the GPU, the online tutorials are said to be configured in the. theanorc file, and I began to wonder that the home directory did not seem to have this thing, and later found out that in fact it is possible to create a. theanorc file.
First we go to the root directory:
cd ~
And then
vim .theanorc # 如果不存在该文件则会建立
Then add the following configuration in. Theanorc:
Save to exit.
At the same time, we should add the Cuda path to the environment variable, otherwise it will be reported: Cannot find the NVCC compiler error. You can write script files spyder.sh as follows:
export PATH="/home/.../anaconda/bin:$PATH"export PATH="/usr/local/cuda/bin:$PATH"spyder
Then we enter in the root directory:
sh spyder.sh
You can open the Spyder.
How fast can GPU speed be configured?
33600 photos of 28x28, in the local computer iteration to run 60 seconds or so, on the server only 2 seconds, of course, the server CPU and memory also played a big role.
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Ubuntu non-root user install Theano configure GPU