如何在 c++ 中获取图层的顶部标签?
How can I get layer's top label in c++?
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) 我在哪里可以找到教程或示例,这些教程或示例解释了使用 caffe 框架使用 caffe 框架的最常用 API?
提前谢谢你。
看看 doxygen 中的Net
类:
const vector< vector< Blob< Dtype > * > > all_ tops = net_->top_vecs(); // get "top" of all layers
Blob<Dtype>* ptop = all_tops[layer_index][0]; // pointer to top blob of layer
如果需要图层的名称,可以
const string layer_name = net_->layer_names()[layer_index];
您可以使用net_
界面访问各种名称/数据,只需阅读文档即可!
相关文章:
- C 和 C++ 中开关语句的案例标签的常量值,但显示不同的行为
- 程序顶部的声明与定义(最佳实践)
- 如何正确指定 goto 语句的标签?
- 使用g++静态初始化带有命名标签的嵌套C++结构
- 顶部带有搜索框的组合框
- 通过水平滚动条更改标签
- 在Visual Studio中单实例Qt应用程序版本5.11.1中,在所有其他窗口的顶部打开Qt MainWindow
- 从 QFontDatabase 设置 QFont 将所有标签设置为等宽字体?Qt C++
- 在C++中存储要输入的标签列表
- 如何在等效列表中查找最小的连接标签
- 标签检测鼠标单击 c++
- GetWindowRect 未正确给出左值和顶部值
- 无法将行编辑中的文本打印到 Qt C++ 中的标签
- 如何根据C++中的标签运行特定函数?
- 如何在C++中更改堆栈的顶部?
- 嵌套容器:为什么我无法访问堆栈队列顶部的堆栈?C++
- 斯塔克,堆栈,也可以在底部和顶部添加整数
- C++ Expat 仅打印元素的第一个字母和标签中的数据
- 如何在 c++ 中获取图层的顶部标签?
- Qt,绘制顶部的标签与图像作为背景