截图: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"*/);
and prototxt file : # name: "
nin_imagenet " # 与 caffe 的 prototxt 相比,下五行发生了变化
通道数 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