最近要把caffe模型转pytorch模型,用到了caffe库,从github(https://github.com/BVLC/caffe.git)上把代码拉下来并编译后,产生了如下错误:ImportError: dynamic module does not define module export function。排查后发现是python版本导致的,要用到caffe最好还是用python2。
git clone https://github.com/BVLC/caffe.git
conda create -n caffe python=2 -y
conda activate caffe
cd path/to/caffe
mkdir build
cd build
cmake ..
make all
make install