Receive AssertionError while optimizing convolution in theano

[亡魂溺海] 提交于 2019-12-02 06:53:13

Yes, theano cannot deal with spaces in the file path...ProgramFiles(x86)

I tried to find answers everywhere about how to escape the space character, and I was unable to do it. At the end, I found out the symbolic link, which creates some kind of directory that points to another directory.

  • Run cmd as administrator.
  • Type the command mklink /D "C:\LinkToProgramFilesX86" "C:\Program Files (x86)" (or any other name you want to the link, but make sure you won't add any spaces to that, lol)

This will create the link and you will be able to see this new dir in Windows Explorer as if it were a shortcut, but working as an actual folder.

Then add this to your [blas] configuration:

ldflags = -L"C:\LinkToProgramFilesX86\IntelSWTools\compilers_and_libraries_2016.3.207\windows\mkl\include"

Not sure if it's the right dir, though, but it definitely solves the problem with spaces. In my case, I used:

-L"C:/LinkToProgramFilesX86/IntelSWTools/compilers_and_libraries_2017/windows/mkl/lib/intel64_win" -lmkl_lapack95_lp64 -lmkl_blas95_lp64 -lmkl_rt -lm -lm

...with the double quotes.

Now, because life isn't easy, a new problem appeared: We did not found a dynamic library into the library_dir of the library we use for blas.

I solved that going to the numpy installation directory, and changing the same thing in the file __config__.py. (Replaced all Program Files (x86) with the new link LinkToProgramFilesX86)

The message stopped showing after that :)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!