Skip to content
Snippets Groups Projects
Commit 42c1f8dd authored by Frisinghelli Daniel's avatar Frisinghelli Daniel
Browse files

Handle case when a class is not present in either ground truth or prediction.

parent 8ee32614
No related branches found
No related tags found
No related merge requests found
......@@ -2717,7 +2717,8 @@ class NetworkInference(BaseConfig):
.format(report_name))
report = classification_report(
y_true, y_pred, target_names=self.class_names,
output_dict=True, zero_division=1)
output_dict=True, zero_division=1,
labels=np.asarray(list(self.use_labels.keys())))
# store report in output dictionary
output['report'] = report2df(report, self.class_names)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment