TypeError: Fetch argument 0 has invalid type , must be a string or Tensor. (Can not convert a int into a Tensor or Operation.)


6月5日的時候,修改dilated_seg.py(使用tensorflow)出現了報錯:

TypeError: Fetch argument 0 has invalid type <type 'int'>, must be a string or Tensor. (Can not convert a int into a Tensor or Operation.)

檢查後發現,是在定義了
acc_value =tf.reduce_mean(tf.keras.metrics.binary_accuracy(y_true=labels_tf, y_pred=output))
後,我還加了一句acc_value = 0.
把acc_value = 0 刪除了就不再報錯了


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM