Skip to content

Integrate caffe #1226

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

Closed
wants to merge 18 commits into from
Closed

Conversation

qingqing01
Copy link
Contributor

fix #253

还未完成~

TODO:

  1. 添加单测
  2. 做实验验证

Copy link
Collaborator

@wangkuiyi wangkuiyi left a comment

Choose a reason for hiding this comment

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

赞这个PR。有几个小疑问。

@@ -403,6 +403,50 @@ class Parameter {
*/
typedef std::function<void(const VectorPtr vecs[])> ExecFunc;
void exec(ExecFunc func);

void resize(int size,
Copy link
Collaborator

Choose a reason for hiding this comment

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

这么长的method implementation应该放在.cc文件里,而不是头文件里。

@@ -97,3 +98,7 @@ add_subdirectory(python)
if(WITH_DOC)
add_subdirectory(doc)
endif()

if(USE_CAFFE)
add_subdirectory(plugin/caffe)
Copy link
Collaborator

Choose a reason for hiding this comment

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

为什么不是放在 third_party 目录里,而是放在一个新的 plugin 目录里呢?这个plugin目录将来还会用来放其他一些什么不属于"3rd party"的内容吗?

@@ -279,6 +279,18 @@ class Layer {
const LayerPtr& getPrev(size_t i) { return inputLayers_[i]; }

/**
* Get the size of inputLayer[i].
*/
const LayerConfig& getConfig(size_t i) { return config_; }
Copy link
Collaborator

Choose a reason for hiding this comment

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

参数 i 并没有在 getConfig 的实现里被用到?

# limitations under the License
# use caffe plugin

set(CAFFE_PATH $ENV{CAFFE_PATH} CACHE PATH "Folder contains caffe")
Copy link
Collaborator

Choose a reason for hiding this comment

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

这里可以假设caffe的源码在某个目录里吗?比如 thrid_party/caffe。如果不存在,则运行 git clone 命令来获取之。要求用户指定一个参数(CAFFE_PATH)意味着需要用户了解更多细节,我感觉这里没有这个必要?

@qingqing01 qingqing01 closed this Mar 27, 2017
@qingqing01 qingqing01 deleted the integrate_caffe branch November 14, 2019 05:28
wangxicoding pushed a commit to wangxicoding/Paddle that referenced this pull request Dec 9, 2021
lizexu123 pushed a commit to lizexu123/Paddle that referenced this pull request Feb 23, 2024
* fix train config

* fix
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.

Integrate Caffe layers
2 participants