Computes the Intersection-Over-Union metric for the given ground truth and predicted labels.
tfg.nn.metric.intersection_over_union.evaluate(
ground_truth_labels: type_alias.TensorLike,
predicted_labels: type_alias.TensorLike,
grid_size: int = 1,
name: str = 'intersection_over_union_evaluate'
) -> tf.Tensor
Note |
In the following, A1 to An are optional batch dimensions, which must be
broadcast compatible, and G1 to Gm are the grid dimensions.
|
Args |
ground_truth_labels
|
A tensor of shape [A1, ..., An, G1, ..., Gm] , where
the last m axes represent a grid of ground truth attributes. Each
attribute can either be 0 or 1.
|
predicted_labels
|
A tensor of shape [A1, ..., An, G1, ..., Gm] , where the
last m axes represent a grid of predicted attributes. Each attribute can
either be 0 or 1.
|
grid_size
|
The number of grid dimensions. Defaults to 1.
|
name
|
A name for this op. Defaults to "intersection_over_union_evaluate".
|
Returns |
A tensor of shape [A1, ..., An] that stores the intersection-over-union
metric of the given ground truth labels and predictions.
|
Raises |
ValueError
|
if the shape of ground_truth_labels , predicted_labels is
not supported.
|