Open to3i opened 9 years ago
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
I encountered the same problem. Have you solved it yet? @iamprem @to3i
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
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:
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!