提交 bcea641f 编写于 作者: L liuyang11

fix formats in README.md

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