2017-02-09 21 views
1

當我運行,在Caffe中使用哪些數據集進行測試?

caffe testcaffe time

測試繼續進行,即使是新導入的網絡架構。哪些數據用於這些測試?

更新:

這裏是從Caffenet,那裏是源沒有參考該數據層的一個片段。它來源於: https://github.com/BVLC/caffe/blob/master/models/bvlc_reference_caffenet/deploy.prototxt

name: "CaffeNet" 
layer { 
    name: "data" 
    type: "Input" 
    top: "data" 
    input_param { shape: { dim: 10 dim: 3 dim: 227 dim: 227 } } 
} 

更新2:

但還是下面的命令作品和運行測試,儘管我們使用deploy.prototxt

caffe test -model=models/bvlc_reference_caffenet/deploy.prototxt -weights=models/bvlc_reference_caffenet/bvlc_reference_caffenet.caffemodel 
+1

看看你的網絡:什麼是輸入層,它指向哪裏? – Shai

+1

@cerebrou,我認爲你錯了。對於測試,您可以使用:https://github.com/BVLC/caffe/blob/master/models/bvlc_reference_caffenet/train_val.prototxt(注意數據層帶有「include {phase:TEST}」,這有源碼) 。 – Jonathan

+1

deploy.txt也沒有丟失功能,這是測試所需的功能。它只是給出了預測的概率。 – Jonathan

回答

2

由於@Shai建議,您需要查看prototxt中定義的輸入層。

既然你不給你的模型的任何細節,我將使用接口教程爲例: http://caffe.berkeleyvision.org/tutorial/interfaces.html

它具有如下:

caffe test -model examples/mnist/lenet_train_test.prototxt -weights examples/mnist/lenet_iter_10000.caffemodel -gpu 0 -iterations 100 

你可以在這裏找到這個prototxt : 例如: https://github.com/BVLC/caffe/blob/master/examples/mnist/lenet_train_test.prototxt

數據源(它是包含用於測試)被給定爲:

source: "examples/mnist/mnist_test_lmdb" 

這是使用的數據。

您可以瞭解如何在examples/mnist目錄下載此數據:

https://github.com/BVLC/caffe/tree/master/examples/mnist

更新:如果數據層不具有源參數,那麼它很可能只是用於「部署」。在這種設置中,數據可以在沒有地面實況數據的情況下直接傳遞給模型。 caffe test不應該在此類型的原型文件上調用。改爲尋找培訓/測試原型文件(大多數型號都帶有這兩種版本)。

相關問題