在分类过程中,我有时会得到“纳”值

时间:2016-01-22 07:53:11

标签: caffe pycaffe

我用GoogLeNet训练了一个caffemodel。在测试过程中,我的准确度非常高:

I0122 06:00:54.384351 2039975936 solver.cpp:409]     Test net output #0: loss1/loss1 = 0.433825 (* 0.3 = 0.130148 loss) 
I0122 06:00:54.385201 2039975936 solver.cpp:409]     Test net output #1: loss1/top-1 = 0.8764 
I0122 06:00:54.385234 2039975936 solver.cpp:409]     Test net output #2: loss1/top-5 = 0.969 
I0122 06:00:54.385243 2039975936 solver.cpp:409]     Test net output #3: loss2/loss1 = 0.327197 (* 0.3 = 0.0981591 loss) 
I0122 06:00:54.385251 2039975936 solver.cpp:409]     Test net output #4: loss2/top-1 = 0.8918 
I0122 06:00:54.385256 2039975936 solver.cpp:409]     Test net output #5: loss2/top-5 = 0.984601 
I0122 06:00:54.385262 2039975936 solver.cpp:409]     Test net output #6: loss3/loss3 = 0.304042 (* 1 = 0.304042 loss) 
I0122 06:00:54.385268 2039975936 solver.cpp:409]     Test net output #7: loss3/top-1 = 0.9228 
I0122 06:00:54.385273 2039975936 solver.cpp:409]     Test net output #8: loss3/top-5 = 0.9768

不,我有一个如下所示的python分类器:

caffe.Classifier(MODEL_FILE, PRETRAINED,
                       mean=np.load('train_image_mean.npy').mean(1).mean(1),
                       channel_swap=(2, 1, 0),
                       raw_scale=255,
                       image_dims=(256, 256))

我通过所有验证数据运行了分类器。准确度非常高。但是我得到一些输入图像的“纳”概率值。这是什么原因? “nan”是什么意思?是“我不承认任何课程”?

编辑: 这个问题不是duplication,因为它指的是分类而不是培训

谢谢。

0 个答案:

没有答案