Caffe GoogleNetclassification.cpp提供随机输出 [英] Caffe GoogleNet classification.cpp gives random outputs

查看:98
本文介绍了Caffe GoogleNetclassification.cpp提供随机输出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Caffe GoogleNet模型训练自己的数据(10k图像,2类).我在第400000次迭代时将其停止,精度为〜80%.

I used Caffe GoogleNet model to train my own data (10k images, 2 classes). I stop it at 400000th iteration with an accuracy of ~80%.

如果我运行以下命令:

./build/examples/cpp_classification/classification.bin
  models/bvlc_googlenet/deploy.prototxt  
  models/bvlc_reference_caffenet/bvlc_reference_caffenet.caffemodel 
  data/ilsvrc12/imagenet_mean.binaryproto
  data/ilsvrc12/synset_words.txt
  1.png

每次给我一个不同的-显然是随机的-结果(即如果我运行n次,则得到n个不同的结果).为什么?我的训练会失败吗?它仍然使用参考模型中的旧数据吗?

it gives me a different -- apparently random -- result each time (i.e. if I run it n times, then I get n different results). Why? Does my training fail? Does it still use the old data from the reference model?

推荐答案

要部署微调的模型时,应检查两点主要内容:

When you want to deploy the fine-tuned model, you should check two main things:

  1. 输入:

  1. Inputs:

  • 输入图像使用 BGR 频道而不是RGB(例如opencv)
  • 平均文件:训练时与平均文件相同吗?
  • Input image uses a BGR channel instead of RGB (e.g. opencv)
  • Mean file: Is same as mean file when training?

Prototxt :

  • 优化模型时,您将在原始原型中更改某些图层的名称,并且应检查是否使用了相同的图层名称?

还有一些 精细技巧

And there are some Fine-tune tricks and CS231n_transfer_learning which are very useful for finetuning.

这篇关于Caffe GoogleNetclassification.cpp提供随机输出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆