Nowadays, AI is getting more and more attention, and this is largely attributed to the rapid development of deep learning. The successful cross-border between AI and different industries has a profound impact on traditional industries.
Recently, I also began to keep in touch with deep learning, before I read a lot of articles, the history of deep learning and related theoretical knowledge also have a general understanding.
But as the saying goes: The end of the paper is shallow, it is known that the matter to preach, rather than coveting, instead of netting. So I decided to play with myself.
The advantages and disadvantages of many popular frameworks are compared, and the Keras framework is selected as the starting point in combination with the hardware conditions.
As most people are accustomed to the Windows system, in addition, because the GPU is more expensive, in the spirit of play is not necessary to buy the GPU (of course, if the interest is strong, you can consider to buy the GPU, after all, is the deep learning of the rapid development of "hero"), and considering some desktops are not convenient networking or poor speed. Based on the above three points, I began to build Keras platform, the middle also took a lot of detours, the final build success. Now the online Keras installation tutorials are all based on online installation, so I think it is necessary to share my installation experience to everyone, I hope to have a deep study to help you.
Here, for the sake of convenience, I only tell the installation steps, the details and reasons are not detailed, need to be able to communicate separately.
Pre-Installation Preparation (description: All the following required software or documentation, in order to facilitate the study as soon as possible, not to waste time on the download software, I have been uniformly packaged in my Baidu network, we can directly download the use. : Http://pan.baidu.com/s/1cvMUKY)
1, Software Preparation: Anaconda2, MinGW, Theano, Keras
2, document Preparation:. Theanorc.txt (Note that there are two points, where the following is said) the contents are as follows:
[Global]
Openmp=false
[Blas]
ldflags=
[GCC]
Cxxflags=-id:\anaconda2\mingw (if ANACONDA2 is installed on drive C, change D to c)
Second, installation steps
1, install ANACONDA2. and installation of other software, directly installed in the C-drive or D-drive, follow the prompts to walk, there is nothing to note, this article to install on the D disk for example.
2, install MinGW. Copy the MinGW folder in the downloaded MinGW folder to the installed Anaconda2 folder and replace the other 5 folders.
3, install Theano. Open the cmd command box, CD to the path of the downloaded Theano folder, execute the command: Python setup.py install. (Do not know the CD to ask around people or degrees Niang)
4, install Keras. Install and Theano similar to open cmd Command box, CD to download the path of Keras folder, execute command: Python setup.py install.
Now that the steps that need to be installed have ended, configure the related documents and environment variables below
5, configure environment variables. Add in the environment variable path: D:\ANACONDA2; D:\Anaconda2\Scripts; (These two are normally installed Anaconda2)
D:\anaconda2\mingw\bin;d:\anaconda2\mingw\x86_64-w64-mingw32\lib;
D:\Anaconda2\Lib\site-packages\theano;
6. Configuration documentation. Open the cmd command box and you will see a path inside the window that will be prepared. Theanorc.txt is placed under this path.
7, modify the default backend. Open C:\Users\
当前用户名
\.keras
, modify the files in the folder keras.json
as follows:
{
"
image_dim_ordering ":
"th",
"
Epsilon ":
1e-07,
"
Floatx ":
"Float32",
"
Backend ":
"Theano"
}
至此,如果操作没有问题的话,keras平台就已经搭建好了。(搭建keras就是这么简单,是吧:-D)
Next, verify that Keras is successfully installed and open the Python Command box:
>>>
Import keras
Using Theano backend.
>>>
If there is no error, it proves that the Keras has been successfully installed.
A few notes:
1, everyone note the path of installation files, this article is to Anaconda2 directly installed in the D disk for example, the specific can be modified according to the actual situation, especially environment variables and txt documents.
2, why do not Anaconda3,. As we all know, Anaconda2 corresponds to Python2,anaconda3 corresponding to Python3. And now found to use ANACONDA3 installation Theano may conflict, temporarily no better solution, so use Anaconda2 better.
3, if you have previously installed Python software, you need to uninstall as completely as possible (including the registry and related files), and then install ANACONDA2.
If you have any problems in the installation process, welcome to the message exchange!
Small show off: today to students to install, according to this step, more than 10 minutes to install (the premise of course is ready to install)!
Transferred from: http://blog.csdn.net/window23/article/details/55105736
Deep Learning Framework Keras platform Construction (keywords: windows, non-GPU, offline installation)