程式筆記
Tensorflow
辨識錯誤 tensorflow KeyError "The name 'import/input' refers to an Operation not in the graph."
K
kidneyweakx
April 7, 2019 (Updated: June 2, 2026)
# 近期遇到的小錯誤
python
KeyError: "The name 'import/input' refers to an Operation not in the graph."
簡單來解釋就是他的名字你打錯了 所以 input 才會 input 錯
我自己爬文去嘗試了各種 "Mul" "input"之類的都錯
最後看到這篇文章 link
# 懶人包
先用
tensorflow的工具將.pb轉成可以用tensorboard可以觀看的格式,再查出input_layer(我的是placeholder)和output_layer是甚麼名字再重新修正。
這是我的程式碼(再依照個人需求更改)
python
python tensorflow\examples\label_image\label_image.py --graph=tmp\output_graph.pb --label=tmp\output_labels.txt --image=tmp\91076.png --input_layer=Placeholder --output_layer=final_result
輸出
Related Articles
No File is an Island: Unraveling Swift Dependencies and Architecture
在 Swift 的世界中,我們習慣了強大的 Xcode 和簡潔的語法,但隨著專案規模的成長,一個隱形的怪獸會開始在程式碼中徘徊:那就是失控的依賴關係
Saved by the Logs: How to Recover a Forgotten Keystore Password via IDE Build Logs.
最遙遠的距離,是密碼就在 IDE 裡但我看不見
Hexo 升級 V5 排除疑難雜症
因為剛好把電腦重灌,然後這個 blog 就躺在D槽等著我幫他換新的環境,然後他就被我快樂的升級了。 hexo 更新 v5.0 hexo 更新到 V5 的步驟相當容易 就可以自動更新了,但是版本大更新,往往都會附帶一些小問題,像他就給我了幾個warning 更新後 Error 解決方法 修改\ config.yml的部分成新版的,原始external\ link只有true的選項,更新後可決定是否開...
