未验证 提交 61b12ed6 编写于 作者: S SunAhong1993 提交者: GitHub

Merge pull request #27 from SunAhong1993/master

fix the bug of protobuf
import os
import sys
import subprocess
SHARED_CAFFE_RESOLVER = None
......@@ -9,6 +10,10 @@ def import_caffepb():
p = os.path.dirname(p)
p = os.path.join(p, '../../proto')
sys.path.insert(0, p)
pb_version = subprocess.getstatusoutput('protoc --version')[1]
ver_str = pb_version.split(' ')[-1].replace('.', '')
ver_int = int(ver_str)
assert vaer_int >= 360, 'The version of protobuf must be larger than 3.6.0!'
import caffe_pb2
return caffe_pb2
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册