From f39e68efe863f7d86b1855e00812bc282af1744a Mon Sep 17 00:00:00 2001 From: SunAhong1993 <48579383+SunAhong1993@users.noreply.github.com> Date: Tue, 18 Jun 2019 21:16:39 +0800 Subject: [PATCH] Update README.md --- caffe2fluid/README.md | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/caffe2fluid/README.md b/caffe2fluid/README.md index b2e9990..8d3c922 100644 --- a/caffe2fluid/README.md +++ b/caffe2fluid/README.md @@ -69,8 +69,22 @@ bash tools/diff.sh alexnet ../../alexnet.prototxt \ 2. 添加`import mylayer`至`kaffe/custom_layers/__init__.py` 3. 准备你的pycaffe作为你的定制版本(与以前的env准备相同) -> 选择一:1. 编译你自己的caffe.proto来代替proto/caffe.proto - 2. 修改./kaffe/caffe/resolver.py +> 选择一: +1. 编译你自己的caffe.proto来代替proto/caffe.proto +2. 修改./kaffe/caffe/resolver.py +```python +try: + # Try to import PyCaffe first + import caffe + self.caffe = caffe +except ImportError: + # Fall back to the protobuf implementation + self.caffepb = import_caffepb() + show_fallback_warning() +# 将上述代码替换为 +self.caffepb = import_caffepb() +show_fallback_warning() +``` > 选择二:更换你的pycaffe到特定的版本 -- GitLab