First, preface
In March 2012, when communicating with a teacher, I first learned about the concept of deep learning, when he suggested that I study GPU computing. Back, carefully read some of the documents, but also see the content of the Deeplearning.net site, but due to time and energy problems, no in-depth study. Recently a bit of time, pick up, ready to build the environment first. Fancy the site recommended by the Theano, so follow the instructions to install down.
Theano's running environment is Python, this scripting language is my first contact. Looking closely at the discovery is really wonderful, Python unexpectedly has 2.x and 3.x two branches, and 2.x also has a considerable user base. In order to make a choice between 2.x and 3.x, or quite a lot of thought, finally, long story short, or choose 3.x. Details of which are not detailed, there is time to add.
As for the operating system, there is no doubt that I choose Win7 x64. First do not choose Linux, because there is no stable distribution, and common applications. And WinXP can be used for 10 years, Win7 can also be used for 10 years. The second is x86 or x64, the latter is no doubt the choice, 32-bit system with 4G of memory is not enough, what I may need is 32G.
However, installing Theano in the Win7 x64 system and python3.x environment does not seem like a simple thing to do. A lot of tutorials have been found online, and at the end it seems to be a little bit. Here also do not comment, first summed up their own installation process.
Second, the installation of software
The Theano Official document "Install_windows.txt" describes the detailed installation steps. But don't do it because it's out of date.
My final choice of installation software is as follows.
1. Theano and Python
Winpython-64bit-3.4.3.3.exe
:
http://sourceforge.net/projects/winpython/
Install the catalogue and choose C:\SciSoft.
If the C drive is a smaller SSD, it will be a D-disk.
2. MSVS compilation environment
Install Microsoft Visual Studio, and I recommend that you install 10.0. But what about the express version, and so humble? Directly installed Pro version, enough, Premium, Ultimate, team version of the function is not used for a lifetime.
However, there is the most important point, that is, must be installed in English version! Otherwise, you just wait for Theano to start the times wrong. At least to 7.0 is so.
File name: En_visual_studio_2010_professional_x86_dvd_509727.iso
If necessary, you should also install a SP1 patch:
Mu_visual_studio_2010_sp1_x86_x64_dvd_651704.iso
These two things: http://msdn.itellyou.cn/
3. CUDA
I installed the 6.5. Because CUDNN's document says to be more than 6.5, and 7.x newness, there may be a problem. When the money has a T40, then consider 7.x.
Filename:
Cuda_6.5.14_windows_general_64.exe (Desktop edition)
Cuda_6.5.14_windows_notebook_64.exe (laptop version)
You can download it by yourself at the official website:
Https://developer.nvidia.com/cuda-toolkit-65
4. CuDNN
Theano says it supports Nvidia's CUDNN, but I haven't installed it, just downloaded it:
Https://developer.nvidia.com/cuDNN
The download needs to be registered, so I put it in the net disk.
Link: Http://pan.baidu.com/s/1ptiqi Password: SBGC
5. Other ...
Without.
There is no need to download theano-0.7.0.zip because it is already in Winpython.
There is no need to install GCC, such as TDM-GCC, because it is already in Winpython.
No need to download stdint.h, because, Winpython already have.
This library is not needed because it is already in the Winpython.
Three, set 1. System Environment variables
No settings required. Cuda_path and Cuda_path_v6_5 are added automatically when Cuda is installed. Winpython and MSVs will not change the path when installing, see the following steps to change.
2. Batch Process Env.bat
In accordance with the Theano official document "Install_windows.txt" recommendation, a env.bat should be established to specifically set the environment variables and path. My env.bat content is as follows:
@echo off rem configuration of paths set Vsforpython= "C:\Program Files (x86) \microsoft Visual Studio 10.0\VC" set Scisoft =%~dp0 rem add Winpython stuff call %scisoft%\winpython-64bit-3.4.3.3\scripts\env. bat rem Configure path for MSVC compilers call %vsforpython%\vcvarsall. bat AMD64 rem return a shell cmd . exe/k
Pull this file into a desktop shortcut, and each time you point it out, a console window is configured for the environment.
3. Theano configuration file
Create a. theanorc file and place it here:
D:\SciSoft\WinPython-64bit-3.4.3.3\settings
[Global] Device = CPU#Device == float32#optimizer_including = CUDNN[NVCC]
NVCC under the original also set something, in fact, not at all.
Iv. Testing
Click Env.bat on the desktop and the console window appears. Try typing python and import Theano separately. My output here is this:
for using Microsoft Visual Studio x64 tools. D:\scisoft>3.4.3 (v3.4.3:9b73f1c3e601, Feb, 22:44:40) [MSC v.1600-bit (AMD64 on Win32 Type for more information.>>> import Theano>>>
This desktop is not installed with Nvidia graphics card, it is CPU.
If there is no error message, the installation is OK.
Also talk about the installation of Theano in Win7 x64 and Python 3.4