[英]Caffe import Python Layer error : 'module' object has no attribute 'Layer'
I have written a python layer to solve the data. 我写了一个python层来解决数据。 However, it gives following error.
但是,它给出以下错误。
Traceback (most recent call last): File "/home/flag/imagenet/process_test.py", line 28, in class process1(caffe.Layer): AttributeError: 'module' object has no attribute 'Layer'.
追溯(最近一次调用):类process1(caffe.Layer)中的文件“ /home/flag/imagenet/process_test.py”,第28行:AttributeError:'module'对象没有属性'Layer'。
I have added the python path and built caffe with_python_layer = 1
. 我添加了python路径并使用
with_python_layer = 1
构建了caffe。 Can someone help me about this? 有人可以帮我吗?
将~/.bash_profile
(OSX)或~/.bashrc
(Linux)中的PYTHONPATH
变量设置为caffe python。
export PYTHONPATH=<caffe-home>/python:$PYTHONPATH
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.