如何在c ++中获得图层的顶级标签?

时间:2017-10-27 08:27:38

标签: c++ neural-network computer-vision deep-learning caffe

1)是否可以在c ++中获取每个图层的顶部标签(例如:ip1,ip2,conv1,conv2)? 如果我的图层是

layer {
  name: "relu1_1"
  type: "Input"
  top: "pool1"
  input_param { 
      shape: { 
          dim:1 
          dim: 1 
          dim: 28 
          dim: 28 
          } 
     }
}

我希望得到顶级标签,在我的情况下是" pool1 "

我搜索了提供的示例,但我找不到任何东西。目前,我只能通过以下命令获取图层名称和图层类型,

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

2)我在哪里可以找到使用c ++来使用caffe框架解释最常用API的教程或示例?

提前谢谢你。

1 个答案:

答案 0 :(得分:1)

在doxygen中查看Net课程:

const string layer_name = net_->layer_names()[layer_index];

如果您想要图层的名称,可以

net_

您可以使用redierct_url = http://127.0.0.1:8080/accounts/facebook/login/callback/界面访问各种名称/数据,只需阅读doc