无法针对DeepLabv3 +推论MeanUU或混淆矩阵

时间:2019-02-26 01:42:32

标签: python tensorflow

我正在评估deep Lab v3 +模型的冻结推理图的meanIOU分数。 在评估平均IOU分数时,我扩展了Frozen_graph,遇到了这个错误:

Traceback (most recent call last):
File "Z:/tfrepo/models-master/models-master/research/deeplab/evaluate_network.py", line 257, in 
tf.app.run()
File "C:\Users\rishabg\Anaconda3\envs\tf_py36\lib\site-packages\tensorflow\python\platform\app.py", line 125, in run
_sys.exit(main(argv)) File "Z:/tfrepo/models-master/models-master/research/deeplab/evaluate_network.py", line 203, in main sum_cm,_= run(sess,img,gt,sum_cm,layer)#)
File "Z:/tfrepo/models-master/models-master/research/deeplab/evaluate_network.py", line 132, in run
feed_dict={INPUT_TENSOR_NAME: [np.asarray(image.convert('RGB'))],"GT:0": [np.asarray(gt)]})
File "C:\Users\rishabg\Anaconda3\envs\tf_py36\lib\site-packages\tensorflow\python\client\session.py", line 887, in run
run_metadata_ptr)
File "C:\Users\rishabg\Anaconda3\envs\tf_py36\lib\site-packages\tensorflow\python\client\session.py", line 1095, in _run
self._graph, fetches, feed_dict_tensor, feed_handles=feed_handles)
File "C:\Users\rishabg\Anaconda3\envs\tf_py36\lib\site-packages\tensorflow\python\client\session.py", line 442, in **init**
self._assert_fetchable(graph, fetch.op)
File "C:\Users\rishabg\Anaconda3\envs\tf_py36\lib\site-packages\tensorflow\python\client\session.py", line 455, in _assert_fetchable
'Operation %r has been marked as not fetchable.' % op.name)
ValueError: Operation 'mean_iou/confusion_matrix/assert_non_negative/assert_less_equal/Assert/AssertGuard/Switch' has been marked as not fetchable.
When I tried to break it down to confusion _matrix and calculate mean_IOU later, but the following error was thrown:
File "Z:/tfrepo/models-master/models-master/research/deeplab/evaluate_network.py", line 257, in 
tf.app.run()
File "C:\Users\rishabg\Anaconda3\envs\tf_py36\lib\site-packages\tensorflow\python\platform\app.py", line 125, in run
_sys.exit(main(argv)) File "Z:/tfrepo/models-master/models-master/research/deeplab/evaluate_network.py", line 203, in main sum_cm,_= run(sess,img,gt,sum_cm,layer)#)
File "Z:/tfrepo/models-master/models-master/research/deeplab/evaluate_network.py", line 132, in run
feed_dict={INPUT_TENSOR_NAME: [np.asarray(image.convert('RGB'))],"GT:0": [np.asarray(gt)]})
File "C:\Users\rishabg\Anaconda3\envs\tf_py36\lib\site-packages\tensorflow\python\client\session.py", line 887, in run
run_metadata_ptr)
File "C:\Users\rishabg\Anaconda3\envs\tf_py36\lib\site-packages\tensorflow\python\client\session.py", line 1095, in _run
self._graph, fetches, feed_dict_tensor, feed_handles=feed_handles)
File "C:\Users\rishabg\Anaconda3\envs\tf_py36\lib\site-packages\tensorflow\python\client\session.py", line 442, in **init**
self._assert_fetchable(graph, fetch.op)
File "C:\Users\rishabg\Anaconda3\envs\tf_py36\lib\site-packages\tensorflow\python\client\session.py", line 455, in _assert_fetchable
'Operation %r has been marked as not fetchable.' % op.name)
ValueError: Operation 'confusion_matrix/assert_non_negative/assert_less_equal/Assert/AssertGuard/Switch' has been marked as not fetchable.

该错误类似于上一个错误。 我在使用Tensorflow版本1.11和1.12的Windows上都尝试了CPU和GPU(cuda 9.0和CUDNN 7.1),但是错误没有改变。

0 个答案:

没有答案