2017-02-09 17 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不应该在此类型的原型文件上调用。改为寻找培训/测试原型文件(大多数型号都带有这两种版本)。

相关问题