诗人的张量流:“名称'导入/输入'是指图中未包含的操作". [英] tensorflow for poets: "The name 'import/input' refers to an Operation not in the graph."

查看:78
本文介绍了诗人的张量流:“名称'导入/输入'是指图中未包含的操作".的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直遵循代码实验室的诗人张量流,并且训练很好,但是当我运行脚本来评估图像时:

I was following the codelabs tensorflow for poets and the training worked fine but when I runned the script to evaluate a image:

python -m scripts.label_image \
    --graph=tf_files/retrained_graph.pb  \
    --image=tf_files/flower_photos/daisy/21652746_cc379e0eea_m.jpg

我遇到以下错误:

The name 'import/input' refers to an Operation not in the graph.

我环顾四周,这与选择输入和输出层有关,脚本label_image.py已将'input'和'output'设置为默认值.我正在使用的架构是"inception_v3".

I looked around and it has something to do with chosing the input and output layer, the script label_image.py has 'input' and 'output' set as default. The architecture I'm using is 'inception_v3'.

推荐答案

我更改了〜/scripts/label_image.py 第77行,它可以正常工作:

I changed ~/scripts/label_image.py line 77 and it works:

来自

input_layer = "input"

input_layer = "Mul"

这篇关于诗人的张量流:“名称'导入/输入'是指图中未包含的操作".的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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