我按照kaggle facialkeypoints比賽從輸入圖像中提取30個面部關鍵點(x,y)。Caffe中的多標籤迴歸
我如何設置咖啡來運行迴歸並生成30維輸出??。
Input: 96x96 image
Output: 30 - (30 dimensions).
我該如何設置caffe?我使用EUCLIDEAN_LOSS(平方和)來得到迴歸輸出。這是一個簡單的使用caffe的邏輯迴歸模型,但它不起作用。看起來準確性層不能處理多標籤輸出。
I0120 17:51:27.039113 4113 net.cpp:394] accuracy <- label_fkp_1_split_1
I0120 17:51:27.039135 4113 net.cpp:356] accuracy -> accuracy
I0120 17:51:27.039158 4113 net.cpp:96] Setting up accuracy
F0120 17:51:27.039201 4113 accuracy_layer.cpp:26] Check failed: bottom[1]->channels() == 1 (30 vs. 1)
*** Check failure stack trace: ***
@ 0x7f7c2711bdaa (unknown)
@ 0x7f7c2711bce4 (unknown)
@ 0x7f7c2711b6e6 (unknown)
這裏是層的文件:
name: "LogReg"
layers {
name: "fkp"
top: "data"
top: "label"
type: HDF5_DATA
hdf5_data_param {
source: "train.txt"
batch_size: 100
}
include: { phase: TRAIN }
}
layers {
name: "fkp"
type: HDF5_DATA
top: "data"
top: "label"
hdf5_data_param {
source: "test.txt"
batch_size: 100
}
include: { phase: TEST }
}
layers {
name: "ip"
type: INNER_PRODUCT
bottom: "data"
top: "ip"
inner_product_param {
num_output: 30
}
}
layers {
name: "loss"
type: EUCLIDEAN_LOSS
bottom: "ip"
bottom: "label"
top: "loss"
}
layers {
name: "accuracy"
type: ACCURACY
bottom: "ip"
bottom: "label"
top: "accuracy"
include: { phase: TEST }
}
請將工作模型定義(.prototxt)更新爲原始文章或答案。 – mrgloom 2015-09-03 10:02:54
精度圖層在迴歸設置中不起作用。這隻適用於分類問題 – curio1729 2017-02-14 17:00:17