在Caffe中实现Python层时的ImportError

时间:2016-10-20 11:20:46

标签: python caffe pycaffe

我正在尝试将自定义python数据层合并到caffe中的网络中。我使用caffe构建了WITH_PYTHON_LAYER=1并将caffe python模块和自定义python数据层模块添加到PYTHONPATH。但是,当我尝试运行它时,它会出现以下错误:

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)

知道我为什么遇到这个问题?提前谢谢。

0 个答案:

没有答案