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.)

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 刪除了就不再報錯了
posted @ 2018-06-06 15:04  -小夭-  阅读(3106)  评论(0编辑  收藏  举报