Error converting Caffe weights to Keras weights

Viewed 117

I'm desperately looking for a way to convert Caffe pre-trained weights to Keras weights. I'm using caffe_weight_converter but I keep getting the error message below and I've no idea why. My notebook can be found here

Traceback (most recent call last):
  File "caffe_weight_converter.py", line 24, in <module>
    import caffe
  File "/usr/local/lib/python3.6/dist-packages/caffe/python/caffe/__init__.py", line 1, in <module>
    from .pycaffe import Net, SGDSolver, NesterovSolver, AdaGradSolver, RMSPropSolver, AdaDeltaSolver, AdamSolver, NCCL, Timer
  File "/usr/local/lib/python3.6/dist-packages/caffe/python/caffe/pycaffe.py", line 13, in <module>
    from ._caffe import Net, SGDSolver, NesterovSolver, AdaGradSolver, \
ModuleNotFoundError: No module named 'caffe._caffe'

Note : Why am I using Python version 3.6? Because if I use version 3.7, I will be getting another error message saying that 'caffe' module has no attribute Net. I saw a post which someone fixed the error by using Python 3.6 instead of Python 3.7 so I decided to give it a try

1 Answers

Make sure you copied the folder in caffe/python/caffe/ into your site-packages folder. Also is a good idea to add it to you Path variables.

Related