Skip to content

Comments

add layer_dict to the python interface#4347

Merged
shelhamer merged 2 commits intoBVLC:masterfrom
nitnelave:python/layer_dict
Feb 17, 2017
Merged

add layer_dict to the python interface#4347
shelhamer merged 2 commits intoBVLC:masterfrom
nitnelave:python/layer_dict

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