Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- y_truth = [batch, H, W, 2] (one-hot encoded)
- logits = [batch, H, W, 2]
- IOU, up_op = tf.metrics.mean_iou(
- labels = argmax(y_truth, axis=3),
- predictions = argmax(logits, axis=3),
- num_classes = 2)
- with tf.control_dependencies([up_op]):
- if create_scalar_summaries:
- tf.summary.scalar('IOU', IOU)
Add Comment
Please, Sign In to add comment