当被caffe.prototxt文件作为输入层调用时,Python找不到模块

2024-06-08 18:25:04 发布

您现在位置:Python中文网/ 问答频道 /正文

我有我的输入数据序列和由序列构造的标签_图层.pypython文件。则输入数据层为:

layer {
  name: "data"
  type: "Python"
  top: "data"
  top: "label"
  top: "clip_markers"
  python_param {
    module: "sequence_layer"
    layer: "videoReadTrain_Graylevel"
  }
  include: { phase: TRAIN }
}

但是,一旦我运行火车.sh通过终端,python找不到模块,错误如下:

^{pr2}$

但如果我在终端中输入python并导入模块,它的工作非常好:

xin@xin-computer:~/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
>>>

我检查了Python路径_图层.py由.prototxt使用“print”调用(搜索路径)". 路径是正确的。在

我使用的是Ubuntu14.04LTS,caffe是用/usr/include/python2.7编译的,我用的是_PYTHON_LAYER:=1。在

有人有办法吗?非常感谢你的帮助。在

最好的, 辛


Tags: 模块数据import路径图层layer终端data