3

I'm trying to incorporate a custom python data layer to a network in caffe. I have built caffe with WITH_PYTHON_LAYER=1 and have added the caffe python modules and the custom python data layer module to PYTHONPATH. However, when I try to run it, it gives the following error:

I1020 16:13:35.672911 24362 layer_factory.hpp:74]             
ImportError: Import by filename is not supported.terminate called after throwing an instance of boost::python::error_already_set'
*** Aborted at 1476960215 (unix time) try "date -d @1476960215" if you are using GNU date ***
PC: @     0x7fea94390c37 (unknown)
        *** SIGABRT (@0x3e800005f2a) received by PID 24362 (TID          0x7fea95db7a40)      from PID 24362; stack trace: ***
        @     0x7fea94390cb0 (unknown)
        @     0x7fea94390c37 (unknown)
        @     0x7fea94394028 (unknown)
        @     0x7fea94995535 (unknown)
        @     0x7fea949936d6 (unknown)
        @     0x7fea94993703 (unknown)
        @     0x7fea94993976 (unknown)
        @     0x7fea955ffe22 caffe::GetPythonLayer<>()
        @     0x7fea95616326 caffe::LayerRegistry<>::CreateLayer()
        @     0x7fea9561b4cc caffe::Net<>::Init()
        @     0x7fea9561d262 caffe::Net<>::Net()
        @     0x7fea955f9139 caffe::Solver<>::InitTrainNet()
        @     0x7fea955fa2f3 caffe::Solver<>::Init()
        @     0x7fea955fa4c6 caffe::Solver<>::Solver()
        @           0x40d030 caffe::GetSolver<>()
        @           0x407143 train()
        @           0x4056e1 main
        @     0x7fea9437bf45 (unknown)
        @           0x405c8d (unknown)
        @                0x0 (unknown)
        Aborted (core dumped)

Any idea why I'm running into this problem? Thanks in advance.

  • 1
    Have you provided the paths to the python libraries in the makefile correctly? Did you check the warnings while compiling caffe? – Harsh Wardhan Oct 21 '16 at 09:33
  • 1
    Might be a bug in your Python layer implementation - see this: https://stackoverflow.com/questions/25997185/python-importerror-import-by-filename-is-not-supported – rkellerm Sep 13 '17 at 07:13

0 Answers0