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

add layer_dict to the python interface #4347

Merged
merged 2 commits into from
Feb 17, 2017
Merged

add layer_dict to the python interface #4347

merged 2 commits into from
Feb 17, 2017

Conversation

nitnelave
Copy link
Contributor

Similar to the blobs map, have a layer map.

This turns
net.layers[list(net._layer_names).index("ip2")]
into
net.layer_dict["ip2"]

@ajtulloch
Copy link
Contributor

Sure, seems reasonable to me. Could you add some unit tests?

@nitnelave
Copy link
Contributor Author

I'd be glad to, but where? :) (Sorry, it's my first time contributing to caffe, and I can't seem to find the tests)

@nitnelave
Copy link
Contributor Author

Nevermind, I found them in python/caffe/test

@nitnelave
Copy link
Contributor Author

Here are the tests. To check the equality of the pointed layers, I only checked the types, but since the layers of the test network are all different types anyway, it seemed reasonable.

@shelhamer shelhamer merged commit c510e33 into BVLC:master Feb 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants