提交 bcea641f 编写于 作者: L liuyang11

fix formats in README.md

上级 2273e96a
### caffe2fluid ### Caffe2Fluid
this tool is used to convert a caffe-model to paddle-model(fluid api) This tool is used to convert a Caffe model to Fluid model
### howto ### Howto
1, prepare caffepb.py in ./proto, two options provided 1, Prepare caffepb.py in ./proto, two options provided
option 1: generate it from caffe.proto using protoc 1) generate it from caffe.proto using protoc
bash ./proto/compile.sh bash ./proto/compile.sh
option2: download one from github directly 2) download one from github directly
cd proto/ && wget https://github.com/ethereon/caffe-tensorflow/blob/master/kaffe/caffe/caffepb.py cd proto/ && wget https://github.com/ethereon/caffe-tensorflow/blob/master/kaffe/caffe/caffepb.py
2, convert you caffe model using convert.py which will generate a python code and weight(in .npy) 2, Convert the caffe model using convert.py which will generate a python code and weight(in .npy)
3, use the converted model to predict 3, Use the converted model to predict
see more detail info in 'tests/lenet/README.md'
(see more detail info in 'tests/lenet/README.md')
### Supported models
- Lenet on mnist dataset
### supported models - ResNets:(ResNet-50, ResNet-101, ResNet-152)
lenet on mnist dataset
resnets:(resnet50, resnet101, resnet152)
model addrs:(https://onedrive.live.com/?authkey=%21AAFW2-FVoxeVRck&id=4006CBB8476FF777%2117887&cid=4006CBB8476FF777) model addrs:(https://onedrive.live.com/?authkey=%21AAFW2-FVoxeVRck&id=4006CBB8476FF777%2117887&cid=4006CBB8476FF777)
### notes ### Notes
some of this code come from here: https://github.com/ethereon/caffe-tensorflow Some of this code come from here: https://github.com/ethereon/caffe-tensorflow
### convert lenet model from caffe format into paddle format(fluid api) ### Convert lenet model from caffe format into paddle format(fluid api)
### howto ### Howto
0, prepare your caffepb.py 1, Prepare your caffepb.py
1, download a lenet caffe-model 2, Download a lenet caffe-model
lenet_iter_10000.caffemodel lenet_iter_10000.caffemodel
download address: https://github.com/ethereon/caffe-tensorflow/raw/master/examples/mnist/lenet_iter_10000.caffemodel download address: https://github.com/ethereon/caffe-tensorflow/raw/master/examples/mnist/lenet_iter_10000.caffemodel
md5: cbec75c1c374b6c1981c4a1eb024ae01 md5: cbec75c1c374b6c1981c4a1eb024ae01
...@@ -13,16 +13,16 @@ ...@@ -13,16 +13,16 @@
md5: 27384af843338ab90b00c8d1c81de7d5 md5: 27384af843338ab90b00c8d1c81de7d5
2, convert this model(make sure caffepb.py is ready in ../../proto) 2, Convert this model(make sure caffepb.py is ready in ../../proto)
* convert to npy format convert to npy format
bash ./convert.sh lenet.prototxt lenet.caffemodel lenet.py lenet.npy bash ./convert.sh lenet.prototxt lenet.caffemodel lenet.py lenet.npy
* save to fluid format(optional) save to fluid format(optional)
bash ./convert.sh lenet.prototxt lenet.caffemodel lenet.py lenet.npy && python ./lenet.py ./lenet.npy ./fluid.model bash ./convert.sh lenet.prototxt lenet.caffemodel lenet.py lenet.npy && python ./lenet.py ./lenet.npy ./fluid.model
4, use this new model(paddle installed in this python) 4, Use this new model(paddle installed in this python)
* use fluid format use fluid format
python ./predict.py ./fluid.model python ./predict.py ./fluid.model
* use npy format use npy format
python ./predict.py ./lenet.npy python ./predict.py ./lenet.npy
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册