Skip to content
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

Caffe2fluid #617

Merged
merged 8 commits into from
Mar 2, 2018
Merged

Caffe2fluid #617

merged 8 commits into from
Mar 2, 2018

Conversation

dragonwarrior
Copy link

add support for converting a caffe-model to fluid-model

@qingqing01 qingqing01 self-requested a review February 1, 2018 11:25
@qingqing01
Copy link
Collaborator

qingqing01 commented Feb 1, 2018

和@qiaolongfei讨论了下,觉得使用 https://github.com/ethereon/caffe-tensorflow 里的代码太多,这个tool总共超过10000行,可否:

  1. 只把和Paddle相关的代码Merge到 models repo ?
  2. 可否git clone https://github.com/ethereon/caffe-tensorflow 在文档里写明白用法?

或者其他更好的方案也行,也欢迎其他同学提供建议~

@dragonwarrior
Copy link
Author

好的,我稍微精简下代码

Copy link
Collaborator

@qingqing01 qingqing01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approve the first version.

@@ -0,0 +1,26 @@
### caffe2fluid
this tool is used to convert a caffe-model to paddle-model(fluid api)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里可以不缩进。

this tool -> This tool xxx .
caffe-mode -> Caffe model
paddle-model -> Fludi model.

Remove fluid api.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@@ -0,0 +1,26 @@
### caffe2fluid
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

caffe2fluid -> Caffe2Fluid

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done


3, use the converted model to predict

(see more detail info in 'tests/lenet/README.md')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

整体不用缩进。

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

this tool is used to convert a caffe-model to paddle-model(fluid api)

### howto
1, prepare caffepb.py in ./proto, two options provided
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1, prepare -> 1. Prepare
后面相同,首字母都大写吧。

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

option 1: generate it from caffe.proto using protoc
bash ./proto/compile.sh

option2: download one from github directly
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

option 1 -> 1).
option2 -> 2).

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

### caffe2fluid
this tool is used to convert a caffe-model to paddle-model(fluid api)

### howto
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

howto -> HowTo

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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不需要缩进,line 20, line 22相同。首字母大写。

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

(see more detail info in 'tests/lenet/README.md')


### supported models
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

supported models -> Supported Models

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done



### supported models
lenet on mnist dataset
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lenet -> LeNet
resnets->ResNets
resnet50 -> ResNet 50

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@qingqing01 qingqing01 merged commit 50afdd8 into PaddlePaddle:develop Mar 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants