【发布时间】:2017-03-15 15:26:05
【问题描述】:
我有一个获取 2 个输入图像的网络,这两个图像属于 9 个类中的多个类。我见过的所有示例 - 在 Caffe 文档中 - 直接从 prototxt 加载输入图像,但是我通过我的 c++ 代码提供信息。
我的输入层如下所示
input: "data"
input_shape{dim:20 dim:6 dim:100 dim:100}
input: "class_label"
input_shape{dim:20 dim:9}
损失层如下所示
layer {
name: "classes"
type: "InnerProduct"
bottom: "ip2"
top: "classes"
param { lr_mult: 1 }
param { lr_mult: 2 }
inner_product_param {
num_output: 9
weight_filler { type: "xavier" }
bias_filler { type: "constant" }
}
}
layer {
name: "class_loss"
type: "SigmoidCrossEntropyLoss"
bottom: "classes"
bottom: "class_label"
top: "class_loss"
}
我的假设是输入应该是一个看起来像这样的流 [0 0 1 0 1 0 1 0 0],其中1表示图像属于该类,0表示不属于,这是真的吗?
我的第二个问题是,我应该对 SigmoidCrossEntropyLoss 层的输出有什么期望(例如 SoftmaxWithLoss 输出概率)?
【问题讨论】:
标签: c++ neural-network deep-learning caffe conv-neural-network