dnouri / kfkd-tutorial

Code for my Kaggle Facial Keypoints Detection tutorial
115 stars 57 forks source link

issues installing Lasagne #17

Closed asimkievich closed 9 years ago

asimkievich commented 9 years ago

Hi there, this is a response to #16, below is your recommendation.

I face the following issue while installing the requirements below:

Help is much appreciated! Thanks so much in advance!

note: directory c:\Windows\System32\src\lasagne does not exist. also, I tried creating the directory and the results are the same

image

Make sure that you've got the right versions of Lasagne and nolearn installed. These have changed since the first version of the tutorial.

pip install -U -r https://raw.githubusercontent.com/dnouri/kfkd-tutorial/master/requirements.txt Alternatively, and maybe better if you're using Conda:

pip uninstall Lasagne pip uninstall nolearn pip install -r https://raw.githubusercontent.com/dnouri/kfkd-tutorial/master/requirements.txt Related: #13

dnouri commented 9 years ago

I've never seen this particular problem before but it looks like uninstalling Lasagne before installing might fix it: pip uninstall Lasagne

asimkievich commented 9 years ago

you are the man Daniel! it worked. thanks a lot.

btw, I get this thread: WARNING (theano.configdefaults): g++ not detected ! Theano will be unable to execute optimized C-implementations (for both CPU and GPU) and will default to Python implementations. Performance will be severely degraded. To remove this warning, set Theano flags cxx to an empty string.

not sure if it is a bogus message or for real. execution takes forever (when compared with previous implementation). Thanks!

asimkievich commented 9 years ago

I am sorry, it appears that there was no g++ compiler or that the environment variable did not point to the correct bin directory. I corrected that and get the error below.

I posted a question on stackoverflow but if you happen to know the answer and post it, I will really appreciate it. Thanks again!

Problem occurred during compilation with the command line below: C:\MinGW\bin\g++.exe -shared -g -march=corei7-avx -mcx16 -msahf -mmovbe -maes -mpclmul -mpopcnt -mabm -mno-lwp -mfma -mno-fma4 -mno-xop -mbmi -mbmi2 -mno-tbm -mavx -mavx2 -msse4.2 -msse4.1 -mlzcnt -mno-rtm -mno-hle -mrdrnd -mf16c -mfsgsbase -mno-rdseed -mno-prfchw -mno-adx -mfxsr -mxsave -mxsaveopt --param l1-cache-size=0 --param l1-cache-line-size=0 --param l2-cache-size=256 -mtune=generic -D NPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -m64 -DMS_WIN64 -IC:\Users\aleja_000\Anaconda\lib\site-packages\numpy\core\include -IC:\Users\aleja_000\Anaconda\include -o C:\Users\aleja_000\AppData\Local\Theano\compiledir_Windows-8-6.2.9200-Intel64_Family_6_Model_60_Stepping_3_GenuineIntel-2.7.9-64\lazylinker_ext\lazylinker_ext.pyd C:\Users\aleja_000\AppData\Local\Theano\compiledir_Windows-8-6.2.9200-Intel64_Family_6_Model_60_Stepping_3_GenuineIntel-2.7.9-64\lazylinker_ext\mod.cpp -LC:\Users\aleja_000\Anaconda\libs -LC:\Users\aleja_000\Anaconda -lpython27 Traceback (most recent call last):

File "C:\Users\aleja_000\Anaconda\lib\site-packages\IPython\core\interactiveshell.py", line 3032, in run_code

C:\Users\aleja_000\AppData\Local\Theano\compiledir_Windows-8-6.2.9200-Intel64_Family_6_Model_60_Stepping_3_GenuineIntel-2.7.9-64\lazylinker_ext\mod.cpp:1:0: sorry, unimplemented: 64-bit mode not compiled in

include

^

exec(code_obj, self.user_global_ns, self.user_ns)

File "", line 6, in from lasagne.layers import DenseLayer File "C:\Program Files (x86)\JetBrains\PyCharm Community Edition 4.0.5\helpers\pydev\pydev_import_hook.py", line 21, in do_import module = self._system_import(name, _args, _kwargs) File "c:\users\aleja_000\anaconda\src\lasagne\lasagneinit.py", line 5, in from . import nonlinearities File "C:\Program Files (x86)\JetBrains\PyCharm Community Edition 4.0.5\helpers\pydev\pydev_import_hook.py", line 21, in do_import module = self._system_import(name, _args, _kwargs) File "c:\users\aleja_000\anaconda\src\lasagne\lasagne\nonlinearities.py", line 6, in from theano.tensor.nnet import sigmoid File "C:\Program Files (x86)\JetBrains\PyCharm Community Edition 4.0.5\helpers\pydev\pydev_import_hook.py", line 21, in do_import module = self._system_import(name, _args, _kwargs) File "C:\Users\aleja_000\AppData\Roaming\Python\Python27\site-packages\theanoinit.py", line 55, in from theano.compile import ( File "C:\Program Files (x86)\JetBrains\PyCharm Community Edition 4.0.5\helpers\pydev\pydev_import_hook.py", line 21, in do_import module = self._system_import(name, _args, _kwargs) File "C:\Users\aleja_000\AppData\Roaming\Python\Python27\site-packages\theano\compileinit.py", line 9, in from theano.compile.function_module import File "C:\Program Files (x86)\JetBrains\PyCharm Community Edition 4.0.5\helpers\pydev\pydev_import_hook.py", line 21, in do_import module = self._system_import(name, _args, _kwargs) File "C:\Users\aleja_000\AppData\Roaming\Python\Python27\site-packages\theano\compile\function_module.py", line 17, in import theano.compile.mode File "C:\Program Files (x86)\JetBrains\PyCharm Community Edition 4.0.5\helpers\pydev\pydev_import_hook.py", line 21, in do_import module = self._system_import(name, _args, _kwargs) File "C:\Users\aleja_000\AppData\Roaming\Python\Python27\site-packages\theano\compile\mode.py", line 11, in import theano.gof.vm File "C:\Program Files (x86)\JetBrains\PyCharm Community Edition 4.0.5\helpers\pydev\pydev_import_hook.py", line 21, in do_import module = self._system_import(name, _args, _kwargs) File "C:\Users\aleja_000\AppData\Roaming\Python\Python27\site-packages\theano\gof\vm.py", line 654, in import lazylinker_c File "C:\Program Files (x86)\JetBrains\PyCharm Community Edition 4.0.5\helpers\pydev\pydev_import_hook.py", line 21, in do_import module = self._system_import(name, _args, *_kwargs) File "C:\Users\aleja_000\AppData\Roaming\Python\Python27\site-packages\theano\gof\lazylinker_c.py", line 125, in preargs=args) File "C:\Users\aleja_000\AppData\Roaming\Python\Python27\site-packages\theano\gof\cmodule.py", line 2042, in compile_str (status, compile_stderr.replace('\n', '. '))) Exception: Compilation failed (return status=1): C:\Users\aleja_000\AppData\Local\Theano\compiledir_Windows-8-6.2.9200-Intel64_Family_6_Model_60_Stepping_3_GenuineIntel-2.7.9-64\lazylinker_ext\mod.cpp:1:0: sorry, unimplemented: 64-bit mode not compiled in . #include . ^ .

dnouri commented 9 years ago

Your last error doesn't look like it's specific to Lasagne or nolearn. Best to Google for the error message, or ask on the Theano mailing list.

asimkievich commented 9 years ago

Hi Daniel, agree.

However, since lasagne / nolearn depend on theano to run - and since I found a solution - I thought I might as well post a link to the issues I created on theano (solution included). Thanks a lot for your help with the other issues. Best,

Alex

Link to theano issues with solution (compilation problems with theano, windows 8.1 64 bits and anaconda python distribution)

https://github.com/Theano/Theano/issues/2867 https://github.com/Theano/Theano/issues/2868

avisekiit commented 8 years ago

Hi Daniel, Your tutorial on Kaggle landmark detection was awesome. I learnt Lasagne step-by-step from that page. I have a practical question when I want to scale up to datasets such as ImageNet. As you are aware, in ImageNet, images are stored under folders such as 'n1', 'n2', with each folder containing about 700-800 images. In your tutorial, we usually load data into variables X and y. But, do you think such huge data can be loaded at once into X. I also have a image regression task. Each original image, I crop to 256X256 and create a heat-map image of 64X64.

Can you suggest a procedure to deal with such large datasets.

Thanks and Regards, Avisek Lahiri Computer Vision Lab Indian Institute of Technology Kharagpur