Skip to content

deeplab/eval.py got nan iou #7894

@shanyucha

Description

@shanyucha

iou = tf.where(tf.greater(tp + fn, 0.0),

When calculate iou, we should pass the fn_op instead of fn to the calculation, or the iou would get nan.

iou = tf.where(tf.greater(tp + fn, 0.0),
tp_op / (tp + fn_op + fp),
tf.constant(np.NaN))

=>>>>
iou = tf.where(tf.greater(tp_op + fn_op, 0.0),
tp_op / (tp_op + fn_op + fp_op),
tf.constant(np.NaN))

Metadata

Metadata

Labels

models:researchmodels that come under research directorytype:bugBug in the code

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions