我正在尝试获取两组边界框之间的平均 IOU 指标。我遇到了这个错误:
RuntimeError:启用急切执行时不支持 tf.metrics.mean_iou。
抛出错误的可重现代码:
import tensorflow as tf
a = [[0.462, 0.465, 0.492, 0.58],
[0.435, 0.385, 0.462, 0.467],
[0.586, 0.449, 0.627, 0.616],
[0.431, 0.671, 0.494, 0.8],
[0.519, 0.282, 0.586, 0.449]]
b = [[0.465, 0.467, 0.491, 0.586],
[0.432, 0.488, 0.464, 0.59],
[0.585, 0.442, 0.633, 0.625],
[0.429, 0.664, 0.493, 0.805],
[0.524, 0.502, 0.594, 0.642]]
tf.compat.v1.metrics.mean_iou(a, b, num_classes=1)
我有什么选择?
慕容708150
相关分类