【发布时间】:2017-07-24 11:14:24
【问题描述】:
我有 2 种不同的型号,比如说 NM1 和 NM2。
所以,我正在寻找的内容类似于下面的示例。
假设我们有一张狗的照片。
NM1 以 0.52 的概率预测图片上它是一只猫,而它以 0.48 的概率预测它是一只狗。 NM2 以 0.6 的概率预测它是一只狗,以 0.4 的概率预测它是一只猫。
NM1 - 会预测错误 NM2 - 会正确预测
NM1 + NM2 - 连接会正确预测(因为 0.48 + 0.6 > 0.52 + 0.4)
所以,每个模型都以 InnerProducts(在 Softmax 之后)结束,它给了我 2 个概率向量。
下一步,我有这 2 个向量,我想添加它们。这里我使用 Eltwise 层。
layer {
name: "eltwise-sum"
type: "Eltwise"
bottom: "fc8"
bottom: "fc8N"
top: "out"
eltwise_param { operation: SUM }
}
在加入 NM1 之前,准确率约为 70%,NM2 约为 10%。
加入后准确率连1%都达不到。
因此,我的结论是我理解了一些错误,如果有人能向我解释我哪里错了,我将不胜感激。
附言。我在创建 lmdb 时确实关闭了 shuffle。
更新
layer {
name: "eltwise-sum"
type: "Eltwise"
bottom: "fc8L"
bottom: "fc8NL"
top: "out"
eltwise_param {
operation: SUM
coeff: 0.5
coeff: 0.5
}
}
#accur for PI alone
layer {
name: "accuracyPINorm"
type: "Accuracy"
bottom: "fc8L"
bottom: "label"
top: "accuracyPiNorm"
include {
phase: TEST
}
}
#accur for norm images alone
layer {
name: "accuracyIMGNorm"
type: "Accuracy"
bottom: "fc8NL"
bottom: "labelN"
top: "accuracyIMGNorm"
include {
phase: TEST
}
}
#accur for them together
layer {
name: "accuracy"
type: "Accuracy"
bottom: "out"
bottom: "label"
top: "accuracy"
include {
phase: TEST
}
}
【问题讨论】:
-
@Shai 我知道这是一个问题,但关闭随机播放只是确保我从两个输入中获得相同图片的一种方法。通过改组,它可以在每个输入上返回不同的图像。
-
随机播放用于生成 lmdbs 的文本文件的行
-
@Shai 我会试试的,谢谢!
标签: machine-learning neural-network deep-learning caffe