未验证 提交 33e55730 编写于 作者: M mamingjie-China 提交者: GitHub

Merge pull request #10 from PaddlePaddle/develop

更新数据
...@@ -129,9 +129,12 @@ def caffe2paddle(proto, weight, save_dir, caffe_proto): ...@@ -129,9 +129,12 @@ def caffe2paddle(proto, weight, save_dir, caffe_proto):
from x2paddle.op_mapper.caffe_op_mapper import CaffeOpMapper from x2paddle.op_mapper.caffe_op_mapper import CaffeOpMapper
from x2paddle.optimizer.caffe_optimizer import CaffeOptimizer from x2paddle.optimizer.caffe_optimizer import CaffeOptimizer
import google.protobuf as gpb import google.protobuf as gpb
ver_str = gpb.__version__.replace('.', '') ver_part = gpb.__version__.split('.')
ver_int = int(ver_str[0:2]) version_satisfy = False
assert ver_int >= 36, 'The version of protobuf must be larger than 3.6.0!' if (int(ver_part[0]) == 3 and int(ver_part[1]) >= 6) \
or (int(ver_part[0]) > 3):
version_satisfy = True
assert version_satisfy, 'google.protobuf >= 3.6.0 is required'
print("Now translating model from caffe to paddle.") print("Now translating model from caffe to paddle.")
model = CaffeDecoder(proto, weight, caffe_proto) model = CaffeDecoder(proto, weight, caffe_proto)
mapper = CaffeOpMapper(model) mapper = CaffeOpMapper(model)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册