Skip to content
This repository has been archived by the owner on Feb 7, 2023. It is now read-only.

Listing all layers #42

Closed
TimZaman opened this issue Aug 29, 2016 · 9 comments
Closed

Listing all layers #42

TimZaman opened this issue Aug 29, 2016 · 9 comments

Comments

@TimZaman
Copy link

Is there a possibility of easily listing all layers and their settings? Maybe to a protobuf? If not, any ideas how I would go about most robustly implementing this?

@slayton58
Copy link
Contributor

Look at caffe2/binaries/print_registered_core_operators.cc (and the compiled binary) - it prints out all registered operators.

@TimZaman
Copy link
Author

Thanks, that's a great functionality. Does anything exist like that for caffe(1)?

@lukeyeager
Copy link
Contributor

Is this what you're looking for? BVLC/caffe#2930

@TimZaman
Copy link
Author

Ooph @lukeyeager, that's the closest thing so far. But it only gives me the layers names. I was just browsing for something reflecting the content of the caffe.proto.

@lukeyeager
Copy link
Contributor

Ever since BVLC/caffe#1694 there hasn't been a way to enumerate the layers just by looking at caffe.proto.

@TimZaman
Copy link
Author

Fair enough. A dirty combination of (1) listing all layers with your function and (2) regexing all variables within the parameters of caffe.proto will do the trick for now. Thanks!

@TimZaman
Copy link
Author

TimZaman commented Sep 1, 2016

For anyone interested, the parsed .proto to .json looks like this:
caffe.proto.json on pastebin
Might be quite handy for third party packages that make use of caffe. I'll return here when caffe2 has matured. Thanks all. Closing for now.

@TimZaman TimZaman closed this as completed Sep 1, 2016
@ajtulloch
Copy link
Contributor

@TimZaman fwiw, you can introspect on protobufs using the https://developers.google.com/protocol-buffers/docs/reference/python/google.protobuf.descriptor-module, etc API, which might make the above file easier to generate in the future.

@TimZaman
Copy link
Author

TimZaman commented Sep 7, 2016

Nice one, didn't find that on my quest. Will come in handy.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants