1
喜被调用,Python不能找到模块,同时用朱古力.prototxt文件作为输入层
我有我的输入数据序列和标签由sequence_layer.py Python文件构成。然后输入数据层是:
layer {
name: "data"
type: "Python"
top: "data"
top: "label"
top: "clip_markers"
python_param {
module: "sequence_layer"
layer: "videoReadTrain_Graylevel"
}
include: { phase: TRAIN }
}
但是,一旦通过我终端运行train.sh,蟒找不到模块,错误是:
... # perilous output are omitted here
layer {
name: "accuracy"
type: "Accuracy"
bottom: "fc8-final"
bottom: "reshape-label"
top: "accuracy"
accuracy_param {
axis: 2
}
}
I0107 13:50:11.438953 6471 layer_factory.hpp:77] Creating layer data
Traceback (most recent call last):
File "/home/xin/caffe/sequence_layer.py", line 4, in <module>
import io
File "/usr/lib/python2.7/io.py", line 51, in <module>
import _io
ImportError: No module named _io
Done.
但是,如果我在终端中输入python并导入模块,它的工作很细:
[email protected]:~/caffe$ python
Python 2.7.6 (default, Jun 22 2015, 17:58:13)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import io
>>> import caffe
>>> import numpy
>>>
而且我查了PYTHONPATH而sequence_layer.py通过使用“打印(sys.path中)” .prototxt调用。路径是正确的。
我使用Ubuntu 14.04LTS和朱古力与/usr/include/python2.7编译和我没有设置WITH_PYTHON_LAYER:= 1
任何人有一个解决方案吗?十分感谢你的帮助。
最佳, 鑫