How can I get caffe type type in C ++

Is it possible to get each

1) type of layer (e.g. convolution, internal product, data, etc.)

2) top layer labels (for example: ip1, ip2, conv1, conv2) in C ++?

I searched for the given examples, but could not find anything. I am currently abel to get only layer names with the following command

cout << "Layer name:" << "'" << net_->layer_names()[layer_index]

I am looking for some command like net _-> layer_type

Thank you in advance!

+4
source share
1 answer

The class Layerhas a public member function virtual const char *type()that returns the type of a layer. Hence

cout << "Layer type: " << net_->layers()[layer_index]->type();

gotta do the trick.

+1
source

Source: https://habr.com/ru/post/1688254/


All Articles