【发布时间】:2018-02-05 06:34:57
【问题描述】:
截图:getBlob返回错误结果:
这里是添加代码:
resize(img, img, Size(224, 224));
dnn::Blob inputBlob = dnn::Blob::fromImages(img);
net.setBlob(".data", inputBlob);
net.forward();
dnn::Blob prob = net.getBlob( "loss1"/*"prob"*/);
和 prototxt 文件:
# 名称:“nin_imagenet”
# 下五行相比 caffe 的 prototxt 有所改变
# 我删除了 top: "data" 的层
input: "data" # 输入名称
input_dim: 1 # 批量
input_dim: 3 # 通道数
input_dim: 224 # 宽度
input_dim: 224 # 高度
# unchaged text
# ...
# another changed compared to caffe's prototxt
# i delete layers who has **bottom: "label"**
layers {
name: "loss1"
type: SOFTMAX
bottom: "fc81"
top: "loss1"
}
# changed below
【问题讨论】:
标签: c++ opencv blob caffe proto