win10+caffe+vs2015+cpu版本搭建过程
需要重要参考下面这个link:
-
win10+caffe+vs2015+cpu版本搭建过程
之后结合下面信息针对安装过程进行完善。- 安装conda时,两个环境变量可以选择都加入
- 执行“bulild_win.cmd”,在scripts路径下生成build文件夹,每次编译前都需要把它删除,否则无法编译
- 编译完成后,将caffe-windows/python目录下的caffe文件夹复制到Anaconda3/envs/caffe/Lib/site-packages目录下。并使用pip安装 scikit-image、scipy、protobuf。
pip install scikit-image pip install scipy pip install protobuf
出现的问题
-
The dependency target “pycaffe” of target “pytest” does not exist
- 由于这个安装Python环境的时候未安装numpy库,或者numpy库安装了,但是无法正常使用,见下面问题2。
-
ImportError:DLL load failed:找不到指定模块的解决方法
1)在conda环境中的python环境下,import numpy 出错,原因是该安装包是使用conda install的,可以使用pip将其卸载后,重新安装pip install numpy安装。
2)在Window系统Path里加入conda的5个环境变量,调整其位置在默认python环境之前,使用conda的python成为默认环境。【应该与此无关】
-
问题:Message type “caffe.LayerParameter” has no field named “upsample_param”.
1)如何给caffe添加upsample层(上采样层)
https://blog.csdn.net/weixin_37889356/article/details/111861332
2)添加位置
https://blog.csdn.net/samsung12345678/article/details/100298525 -
问题:Check failed: MaxBottomBlobs() >= bottom.size() (1 vs. 2)
回答:由于Upsample层的输入包括两个(一个是上一层的feature map,一个downsample时pooling的index),所以caffe层也需要两输入的upsample层。解决方案:加入SegNet-Caffe的upsample层。与 https://blog.csdn.net/weixin_37889356/article/details/111861332 中一致,需要在https://github.com/TimoSaemann/caffe-segnet-cudnn5中拿出如下四个文件,加入对应位置,并重新编译caffe,方可解决该问题。
-
VS2013和python3不可兼得
VS2015可以使用python2和python3。
VS2013只能使用python2。