AttributeError: module 'caffe' has no attribute 'net_spec'

28 views
Skip to first unread message

blueshark27

unread,
Jun 12, 2018, 8:01:17 AM6/12/18
to Caffe Users
Hello guys,

I am new to caffe and I just compiled the opencl-Branch with Python 3.5.
Now I tried to get started with python and so I tried to get a simple Python script run.

import sys
import numpy as np
import matplotlib.pyplot as plt
import os
sys
.path.append(os.path.abspath('../../') + "\\caffe-opencl\\caffe-opencl\\python")
import caffe

These python lines are causing this error message:

Traceback (most recent call last):

 
File "<ipython-input-59-7781b3d8dc14>", line 6, in <module>
   
import caffe.net_spec

 
File "E:\Dev\caffe\caffe-opencl\caffe-opencl\python\caffe\__init__.py", line 9, in <module>
   
from .net_gen import metalayers, fix_input_dims

 
File "E:\Dev\caffe\caffe-opencl\caffe-opencl\python\caffe\net_gen.py", line 5, in <module>
   
import caffe.net_spec as net_spec

AttributeError: module 'caffe' has no attribute 'net_spec'

Actually, I have no clue how to fix it. It seems, that coffe.net_spec is not found. Since caffe is found, I am guessing, that the pathes are correct and so that caffe.net_spec should also be found.

Any ideas or hints?

Best,
blueshark
Reply all
Reply to author
Forward
0 new messages