adjustment fot CCS

This commit is contained in:
Steffen Illium
2021-03-19 17:16:38 +01:00
parent 74a2603c79
commit 0a0a1cdcb5
5 changed files with 27 additions and 22 deletions

View File

@@ -148,7 +148,7 @@ class TestMixin:
class_names = {val: key for val, key in enumerate(['background', 'chimpanze', 'geunon', 'mandrille', 'redcap'])}
df = pd.DataFrame(data=dict(filename=[Path(x).name for x in sorted_y.keys()],
prediction=y_max.cpu().numpy()))
prediction=[class_names[x.item()] for x in y_max.cpu()]))
result_file = Path(self.logger.log_dir / 'predictions.csv')
if result_file.exists():
try: