调试 CongWeilin/mtcnn-caffe 中 caffe 新的层的时候遇到的问题

#!/usr/bin/env sh
export PYTHONPATH=$PYTHONPATH:/home/run/YHS/caffe/mtcnn-caffe/12net

set -e
/home/run/YHS/caffe/caffe-ssd/build/tools/caffe train \
	 --solver=./solver.prototxt \

在运行上面的脚本时,发生了错误:

[libprotobuf FATAL google/protobuf/stubs/common.cc:61] This program requires version 3.7.0 of the Protocol Buffer runtime library, but the installed version is 3.6.1.  Please update your library.  If you compiled the program yourself, make sure that your headers are from the same version of Protocol Buffers as your link-time library.  (Version verification failed in "google/protobuf/descriptor.pb.cc".)

原因可能是因为Linux系统中配置了多版本的caffe,而每个版本的caffe 的依赖又不一样,从而产生了冲突。

我直接抛弃了用脚本训练的方法,而直接在新的层的路径下直接用python来训练:

import sys
sys.path.append('./caffe/python')
import caffe

import caffe

caffe.set_device(0)
caffe.set_mode_gpu()

solver=caffe.SGDSolver('solver.prototxt')
solver.net.forward()

然后就不报错了

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值