neural-network - 使用 TensorRT Caffe Parser 解析 Mobilenet-SSD 时出错,“ditcaffe.LayerParameter”没有名为“prior_box_param”的字段
问题描述
我正在使用 TensorRT caffe 解析器从https://github.com/chuanqi305/MobileNet-SSD解析 MobileNet-SSD caffe 模型。我使用 Jetson TX2 中的 Jetpack 3.3 作为平台。如何从 nvinfer 库中修复此错误?API中甚至还有一个 TensorRT 类nvinfer1::plugin::PriorBoxParameters
。但是这个图层句柄似乎没有定义。图层参数名称和格式是否有任何错误?或者我们是否必须为此创建一个自定义层插件。有人对此有实现吗?
错误如下,
[libprotobuf ERROR google/protobuf/text_format.cc:298] Error parsing text-format ditcaffe.NetParameter: 1245:18: Message type "ditcaffe.LayerParameter" has no field named "prior_box_param".
ERROR: CaffeParser: Could not parse deploy file
与此错误相关的源代码行,
m_network = m_builder->createNetwork();
m_parser = createCaffeParser();
const IBlobNameToTensor* blobNameToTensor = m_parser->parse(deployFpath, modelFpath, *network, DataType::kFLOAT);
prototxt 文件中给定层的错误,
layer {
name: "conv11_mbox_priorbox"
type: "PriorBox"
bottom: "conv11"
bottom: "data"
top: "conv11_mbox_priorbox"
prior_box_param {
min_size: 60.0
aspect_ratio: 2.0
flip: true
clip: false
variance: 0.1
variance: 0.1
variance: 0.2
variance: 0.2
offset: 0.5
}
}
解决方案
您必须从 ptototxt 文件中删除所有具有 _param 的块,然后您应该使用插件 API 删除层。访问此链接的讨论以获得清晰的理解:https ://github.com/chenzhi1992/TensorRT-SSD/issues/5
推荐阅读
- java - Kotlin Random 和 Java Random 的分布差异
- isabelle - 在伊莎贝尔,执行共归纳需要什么格式的目标
- forms - 按钮的行为就像我以指数方式多次单击它
- android - Firebase 云消息传递无法在 API 28 及更低版本的 Android 上运行
- excel - 设置单元格值会丢失边框样式
- c - 从变量参数函数中获取字符串
- mysql - 由于 mysql 错误,无法为 phpmyadmin 设置足够的密码
- google-cloud-platform - ACL 限制对存储对象的访问
- typescript - Returntype any 而不是 unknown 对于无类型化的 reducer
- javascript - TweenMax - 如何以不同的速度为元素设置动画?