-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update readme for caffe2fluid #839
Update readme for caffe2fluid #839
Conversation
1) generate it from caffe.proto using protoc | ||
bash ./proto/compile.sh | ||
- download one from github directly | ||
cd proto/ && wget https://github.com/ethereon/caffe-tensorflow/blob/master/kaffe/caffe/caffepb.py |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
需要使用code格式:
cd proto/ && wget https://github.com/ethereon/caffe-tensorflow/blob/master/kaffe/caffe/caffepb.py
@@ -3,19 +3,27 @@ This tool is used to convert a Caffe model to Fluid model | |||
|
|||
### Howto | |||
1, Prepare caffepb.py in ./proto if your python has no 'pycaffe' module, two options provided here: | |||
- generate it from caffe.proto using protoc | |||
bash ./proto/compile.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
需要使用code格式,统一改下吧,同时给所有的*.sh文件,添加+x模式吧。
./proto/compile.sh
@@ -3,19 +3,27 @@ This tool is used to convert a Caffe model to Fluid model | |||
|
|||
### Howto | |||
1, Prepare caffepb.py in ./proto if your python has no 'pycaffe' module, two options provided here: | |||
- generate it from caffe.proto using protoc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generate pycaffe
from caffe.proto by protoc
@@ -3,19 +3,27 @@ This tool is used to convert a Caffe model to Fluid model | |||
|
|||
### Howto | |||
1, Prepare caffepb.py in ./proto if your python has no 'pycaffe' module, two options provided here: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1, -> 1. 逗号,换成.吧。
'pycaffe' -> pycaffe
'' -> ``
./proto -> proto
directory.
|
||
2) download one from github directly | ||
cd proto/ && wget https://github.com/ethereon/caffe-tensorflow/blob/master/kaffe/caffe/caffepb.py | ||
2, Convert the caffe model to fluid model |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
caffe -> Caffe
fluid -> Fluid
专有名字,请正确书写格式。 需要统一修改下。
python convert.py alexnet.prototxt \ | ||
--caffemodel alexnet.caffemodel \ | ||
--data-output-path alexnet.npy \ | ||
--code-output-path alexnet.py |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
用code格式
python convert.py ....
|
||
2, Convert the caffe model using 'convert.py' which will generate a python script and a weight(in .npy) file | ||
- save weights as fluid model file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
save weights as fluid model file -> Save weights as Fluid model file
3, Use the converted model to predict | ||
|
||
see more detail info in 'examples/xxx' | ||
4, Use the converted model to predict |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
4, -> 4.
5, -> 5.
predict -> infer.
|
||
see more detail info in 'examples/xxx' | ||
4, Use the converted model to predict | ||
- see more detail info in 'examples/imagenet/run.sh' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
detail info -> details
|
||
5, compare the inference results with caffe | ||
- see more detail info in 'examples/imagenet/diff.sh' | ||
|
||
### Tested models |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
下面的模型链接地址,我用不用代理,都没打开。
add more info about how to use this tool