inference restored

This commit is contained in:
steffen
2020-05-16 08:18:27 +02:00
parent ca1599e17b
commit 511b8064cd
3 changed files with 14 additions and 19 deletions

@ -16,6 +16,8 @@ if __name__ == '__main__':
continue
out_file = (model_path / metric_file_name)
for paramter_configuration in model_path.iterdir():
if not model_path.is_dir():
continue
uar_scores = defaultdict(list)
for metric_file in paramter_configuration.rglob(metric_file_name):
with metric_file.open('r') as f:
@ -37,7 +39,7 @@ if __name__ == '__main__':
metric_dict[header].append(value)
for score, func in zip(['mean', 'max', 'median', 'std'], [np.mean, np.max, np.median, np.std]):
try:
uar_scores[score].append(func(np.asarray(metric_dict['uar_score'])).round(2))
uar_scores[score].append(round(func(np.asarray(metric_dict['uar_score'])) * 100, 2))
except ValueError as e:
print(e)
pass