This commit is contained in:
Jakub Zaręba 2023-05-10 19:02:11 +02:00
parent 083fa8a154
commit bdaba18487

View File

@ -33,7 +33,7 @@ if os.path.exists(metrics_file):
metrics_df = pd.read_csv(metrics_file)
else:
metrics_df = pd.DataFrame(columns=['top_1_accuracy', 'top_5_accuracy'])
metrics_df = metrics_df.append({'top_1_accuracy': np.mean(top_1_accuracy), 'top_5_accuracy': np.mean(top_5_accuracy)}, ignore_index=True)
metrics_df = metrics_df.concat({'top_1_accuracy': np.mean(top_1_accuracy), 'top_5_accuracy': np.mean(top_5_accuracy)}, ignore_index=True)
metrics_df.to_csv(metrics_file, index=False)
plt.figure(figsize=(10, 6))