This commit is contained in:
ibuki420 2023-07-17 21:41:54 -05:00 committed by GitHub
commit babc872017
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -52,7 +52,7 @@ def get_multi_binary_class_metric_fn(metrics, classes=None, class_dim=1):
num_labels = shape[class_dim] num_labels = shape[class_dim]
# If we are doing multi-class / multi-label metric, the number of classes / labels must # If we are doing multi-class / multi-label metric, the number of classes / labels must
# be know at graph construction time. This dimension cannot have size None. # be known at graph construction time. This dimension cannot have size None.
assert num_labels is not None, "The multi-metric dimension cannot be None." assert num_labels is not None, "The multi-metric dimension cannot be None."
assert classes is None or len(classes) == num_labels, ( assert classes is None or len(classes) == num_labels, (
"Number of classes must match the number of labels") "Number of classes must match the number of labels")