Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python layers not compatible with matcaffe interface? #2850

Open
to3i opened this issue Aug 3, 2015 · 3 comments
Open

Python layers not compatible with matcaffe interface? #2850

to3i opened this issue Aug 3, 2015 · 3 comments

Comments

@to3i
Copy link
Contributor

to3i commented Aug 3, 2015

There seems to be a dependency problem involving python layers #1703 and the matcaffe interface #2505.

Using matcaffe in order to load a network that contains a python layer will result in an import error:

ImportError: /usr/lib/python2.7/dist-packages/numpy/core/multiarray.so: undefined symbol: PyExc_SystemError

I am running the current master branch of caffe on Ubuntu 14.04. Using pycaffe everything works as advertised. Maybe someone can confirm this. Thanks!

@iamprem
Copy link

iamprem commented May 9, 2016

Hi, I also having the same issue. I have my Loss Layer defined in python and trying to train the network using matcaffe because I have few other stuff written in MATLAB that i will be using along training.

Traceback (most recent call last):
  File "/home/prem/MATLAB/matrobreg/L1LossLayer.py", line 1, in <module>  
    import caffe  
  File "/share/caffe/python/caffe/__init__.py", line 1, in <module>
    from .pycaffe import Net, SGDSolver, NesterovSolver, AdaGradSolver, RMSPropSolver, AdaDeltaSolver, AdamSolver
  File "/share/caffe/python/caffe/pycaffe.py", line 11, in <module>
    import numpy as np
  File "/usr/lib/python2.7/dist-packages/numpy/__init__.py", line 153, in <module>
    from . import add_newdocs
  File "/usr/lib/python2.7/dist-packages/numpy/add_newdocs.py", line 13, in <module>
    from numpy.lib import add_newdoc
  File "/usr/lib/python2.7/dist-packages/numpy/lib/__init__.py", line 8, in <module>
    from .type_check import *
  File "/usr/lib/python2.7/dist-packages/numpy/lib/type_check.py", line 11, in <module>
    import numpy.core.numeric as _nx
  File "/usr/lib/python2.7/dist-packages/numpy/core/__init__.py", line 6, in <module>
    from . import multiarray
ImportError: /usr/lib/python2.7/dist-packages/numpy/core/multiarray.so: undefined symbol: PyExc_SystemError

If anyone have a solution to use python layer along with matcaffe, please drop a comment below.
Thanks

@LucyLu-LX
Copy link

I encountered the same problem. Have you solved it yet? @iamprem @to3i

@iamprem
Copy link

iamprem commented Jan 28, 2018

Unfortunately I couldn't solve it. I decided to use pycaffe and used matlab engine in python to run the matlab scripts.
https://www.mathworks.com/help/matlab/matlab_external/install-the-matlab-engine-for-python.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants