Win10 + Python + MXNet + VS2015 configuration, win10mxnet
The project needs to use MTCNN to detect, align, and cut faces. MXNet is used as the framework, but various frameworks in my Ubuntu are in disorder, if you don't want to worry about it, you have to configure one in windows. However, there was not much information on the Internet. After struggling for a few days, I decided to leave such a document.
First, we are not using the MXNet set released by DMLC on github. Its windows version will not be updated in 2016. The address responsible for maintenance is:
Https://github.com/yajiedesign/mxnet/releases
This is a newer version. Coincidentally, MTCNN also uses the new version of MXNet, so the 16-year version won't work well. It depends on this day. The following products are collectively referred to as [day-to-day version ].
Some parameters in the new MXNet version do not exist in the library compiled by vc12. Therefore, we recommend that you use the vc14 version, that is, VS2015.
Before officially speaking about the installation and configuration steps, we recommend a software called Dependency Walker, which is used to clarify the Dependency between the library files and help you talk about the version of the dependent library later:
This is the use of the software. Pay attention to the red box section. here we need to be a bit sensitive to the file name:
1. LIBopenBLAS is nothing special. It comes with the latest version.
2. Pay attention to the following numbers for CUDART64_80, CURAND64_80, CUBLAS64_80, CUFFT64_80, and NVRTC64_80. You can find these files in 3rdparty \ cudart. if the version number is different, correct them by yourself, the daily version should be provided.
3. cuDNN64_5: This is the file to be downloaded by yourself. From the file name, we can know that we need a 64-bit cudnn. The version number starts with 5, according to the above statement, we also need a cudnn that works with CUDA8.0.
4. NVCUDA this is obviously NVIDIA's CUDA, but it doesn't take the version number any longer.
5. VCOMP140 can be found in 3rdparty \ vc. if the version number is incorrect, modify it by yourself.
6. Public faces such as KERNEL32 and USER32 should not have any special requirements.
The [WinError 126] In the import process is basically for this reason.
------------------------ Next, we will officially start to talk about the steps ----------------------------
1. Download and decompress the vc14 base package in the daily update address.
Download and decompress xxxx_mxnet_x64_vc14_gpu.7z in the address of the daily update to the base package directory to form a complete structure.
2. The most important thing is the one that needs to be made, compile, and used in other tutorials.Build \ libmxnet. dll, That is, the file followed by dependency walker above, so the pre-compiled version is a great help for us to compile this dll in advance.
3. [WinError 126] occurs because when a module is imported, the dependent libraries required by its dependent libraries must also be available. Otherwise, an error is reported.
4. Install cuda8.0 as mentioned above. Many tutorials are also very good.
5. Prepare the cudnn5 series for cuda8.0
6. Take a look at the files in the daily updates. Run setupenv. cmd in the root directory. This file sets all the relevant environment variables.
We recommend that you pay attention to the path in [user variables] before clicking it. I encountered the problem that the characters were too long to be truncated during use. In other words, some of my previous user variables were damaged, so please prepare in advance
7. Run the command line in the python directory.
D:\MXNet\python> python setup.py install
8. Finally, you can copy the relevant cudnn files in MXNet \ 3 rdparty. Other dependent files should be in
9. You can try to import mxnet in python.
Wish you success