我有安装了Python 2.7和3.5的Ubuntu 16.04。 我从存储库中获得了Caffe并成功编译,所有测试都通过了。
当我在终端工作时,我可以导入caffe模块,它有“io”:
>>> import caffe
>>> caffe.io
<module 'caffe.io' from 'caffe/io.pyc'>
但是当我使用PyCharm时,“io”缺席:
model = caffe.io.caffe_pb2.NetParameter()
AttributeError: 'module' object has no attribute 'io'
我正在尝试运行的代码示例是https://github.com/google/deepdream/blob/master/dream.ipynb