typeerror: __init__() missing 2 required positional arguments: 'inputs' and 'outputs'


1 問題描述

使用下邊這條命令去檢查 TensorFlow Object Detection API是否正確安裝:

python object_detection\builders\model_builder_test.py

報如下錯誤:

typeerror: __init__() missing 2 required positional arguments: 'inputs' and 'outputs'

2 解決

原因分析:

使用的models這個repository與當前版本的tensorflow不兼容(1.6.0)。

解決辦法:

github上有人說,使用models是r1.5並且tensorflow版本是1.4.0可以解決。

由於我的是1.6,若想降級到1.4,還需要將cuda進行降級,比較麻煩。(沒有嘗試)

后來又看到有人將tensorflow的版本升級到1.8.0,問題也得到了解決。經過我的實踐,確實可以!!!


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM