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

Give back to layer what is layer's, and to factory what is factory's #1270

Merged
merged 1 commit into from
Oct 13, 2014

Conversation

Yangqing
Copy link
Member

This PR puts all registration code near where they are defined. This would allow us to hopefully make layers more modular. For example, if we want to disable a layer, simply put an #ifdef around its cpp file (as well as its declaration).

I don't know where to put all those Creator functions, so they are still inside layer_factory.cpp. Ideally we could also create separate cpp files like conv_layer_factory.cpp and so on, but given the fact that they are all core layers, maybe it's an overkill to separate them anyway.

@shelhamer
Copy link
Member

Nice separation!

Ideally we could also create separate cpp files like conv_layer_factory.cpp and so on, but given the fact that they are all core layers, maybe it's an overkill to separate them anyway.

Keeping the core factories in layer factory sounds good to me. We can always follow up to further separate everything.

@Yangqing
Copy link
Member Author

Thanks for checking :) Also updated the wiki reflecting this change:

https://github.com/BVLC/caffe/wiki/Development

Yangqing added a commit that referenced this pull request Oct 13, 2014
Give back to layer what is layer's, and to factory what is factory's
@Yangqing Yangqing merged commit 98dbfd7 into BVLC:dev Oct 13, 2014
@Yangqing Yangqing mentioned this pull request Oct 13, 2014
RazvanRanca pushed a commit to RazvanRanca/caffe that referenced this pull request Nov 4, 2014
Give back to layer what is layer's, and to factory what is factory's
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.

2 participants