Mxnet compilation and installation under 64-bit Win7

Source: Internet
Author: User
Tags mxnet

Note: This article is original, Noah Zhang (http://www.cnblogs.com/noahzn/)

My notebook configuration is relatively low, want to install a lightweight mxnet try, installed after the error, not a valid application, Can't find libinfo.py et cetera, the same problem on GitHub also have a lot of people ask, but the author said also do not know where the problem, their own toss for two days, finally installed can use, share the following:

First Report my machine environment:win7-64bit, has installed winpython-64bit-3.4.3.2, CUDA5.5, VS2013 update5.

First, obtain mxnet:

git clone--recursive https://github.com/dmlc/mxnet

My path is D:\mxnet\.

Second, install other dependencies:

Requires OpenCV, Openblas, CuDNN, CUDA ( highly recommended, top three with my upload of a packaged version )

1. OpenCV3:

Download website (http://sourceforge.net/projects/opencvlibrary/files/opencv-win/3.0.0/opencv-3.0.0.exe/download), You can also use a separate version of my upload. Link: http://pan.baidu.com/s/1c0YkB8 Password: mnu6

2. Openblas:

Official website Download (https://sourceforge.net/projects/openblas/), the goal is to generate openblas.lib, their own trouble, you can look at the back I provide a ready-made version.

3. CuDNN:

Download (HTTPS://DEVELOPER.NVIDIA.COM/CUDNN), download need to sign up for Nvidia developer account, you can directly see the ready-made version behind me.

4. CUDA7.5

Download the website (https://developer.nvidia.com/cuda-downloads) and install it. I uploaded a separate version: Link: http://pan.baidu.com/s/1c2Bd4Gg Password: fpm2

5. Packaged version:

In order to facilitate everyone, do not have to build openblas.lib, I packed the OpenCV3, Openblas, CuDNN, you can download the extract directly to the Mxnet directory (my directory is: D:\mxnet\mxnet\mxnet_ thirdparty) Link: http://pan.baidu.com/s/1c1VLZAK Password: ntrj

Third, enhance the VS2013:

Because Mxnet uses many of the new features of C + + 11, you need to enhance VS2013 to support it, and download the Visual C + + Compiler (https://www.microsoft.com/en-us/download/ details.aspx?id=41151) and install, and then C:\Program Files (x86) \microsoft Visual C + + Compiler All the copies in the Ctp\ folder to your VS2013 directory, such as: Copy to D:\Microsoft Visual Studio 12.0\vc\ directory overlay.

Also can download from my Baidu disk: Link: http://pan.baidu.com/s/1bEVi5C Password: P6S3

Four, modify the configuration file (not sure whether it is necessary, I explore the process of self-change. ):

Open Mxnet\make\config.mk and change the following:

Line 49th: USE_CUDNN = 1

Line 69th: Use_blas = Openblas

In addition to search Mxnet directory of other config.mk files, corresponding to the Use_blas after the value of the change to Openblas.

Five, CMake compile:

I downloaded the latest version of CMake, Link: http://pan.baidu.com/s/1kU7RkGJ Password: Suwe

Then follow my setup below, Configure,generate, no error will be OK

VI. Generate Libmxnet.dll:

VS2013 Open the Mxnet_build directory Mxnet.sln, mode switch to release, compile, all OK, after the Mxnet_build\release directory generated libmxnet.dll files.

VII. Install Python's mxnet library:

Copy the DLL file generated by the sixth step into the D:\mxnet\mxnet\python\mxnet directory, switch to the directory, and execute the Python setup.py build; Python setup.py Install

Eight, solve the problem:

At this time after installation, import mxnet will be error, and two times import error is different, one is not found DLL, The second time is not find libinfo.py, is this question on GitHub many people ask, but there is no complete solution, my own groping solution is: I upload the package version of the compressed package of 9 DLL files copied to the Python.exe directory, and then the line!

Nine, run an example to try:

Running example is also a headache, the example code in the relevant configuration is under Linux, the dataset should also download itself. Create a new folder within the D:\mxnet\mxnet\example\image-classification directory: Mnist

Download DataSet: Link: http://pan.baidu.com/s/1gfHIXt5 Password: u33x

4 files are extracted to the Mnist directory, the file name of the '. ' Change to '-', that is, four files without a suffix name. (or you can change the code in train_mnist.py directly)

Official examples See here: http://mxnet.readthedocs.io/en/latest/get_started/#python

Mxnet compilation and installation under 64-bit Win7

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.