Tensorflow重新训练图像分类器

我只是按照文档此处图像重新训练 </ p>

在步骤使用重新训练的模型</ strong>中,我有一个非常正确的估算值</ p>

  python label_image.py --graph = graph.pb --labels = labels.pb --input_layer =占位符--output_layer = final_result --image = .. / color / blue / blue25  .jpg 
2018-09-30 10:57:53.153552:I tensorflow / core / platform / cpu_feature_guard.cc:141]您的CPU支持该TensorFlow二进制文件未编译为使用的指令:AVX2 FMA
blue 0.9326643
red 0.06733578 \ n </ code> </ pre>

但是如果我尝试在此代码中使用:</ p>

由hybridgroup / gocv进行的tf分类器 </ p>

我有一个 错误:</ p>

  libc ++ abi.dylib:以uncau终止 类型cv :: Exception的GHT异常:OpenCV(3.4.2)/tmp/opencv-20180704-99354-1kt9ska/opencv-3.4.2/modules/dnn/src/dnn.cpp:2270:错误:(-204: 找不到请求的对象)在函数'setInput'
</ code> </ pre>

中找不到请求的Blob“输入”,但是如果我使用Tensorflow“ Inception”模型,则可以正常工作。</ p >

您有个主意吗?</ p>
</ div>

展开原文

原文

I just followed the documentation here Image Retraining

In step Using the Retrained Model I have a very correct estimate

python label_image.py --graph=graph.pb --labels=labels.pb --input_layer=Placeholder --output_layer=final_result --image=../color/blue/blue25.jpg
2018-09-30 10:57:53.153552: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
blue 0.9326643
red 0.06733578  

But if i try to use in this code :

tf-classifier by hybridgroup/gocv

i have a error :

libc++abi.dylib: terminating with uncaught exception of type cv::Exception: OpenCV(3.4.2) /tmp/opencv-20180704-99354-1kt9ska/opencv-3.4.2/modules/dnn/src/dnn.cpp:2270: error: (-204:Requested object was not found) Requested blob "input" not found in function 'setInput'

But if I use Tensorflow "Inception" model it works.

Do you have an idea ?

draw62188
draw62188 我有同样的错误。你有没有找到答案?
一年多之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问