l
This commit is contained in:
parent
5e19ff3ce8
commit
1ee4b4103d
@ -32,7 +32,8 @@ if os.path.exists(metrics_file):
|
|||||||
metrics_df = pd.read_csv(metrics_file)
|
metrics_df = pd.read_csv(metrics_file)
|
||||||
else:
|
else:
|
||||||
metrics_df = pd.DataFrame(columns=['top_1_accuracy', 'top_5_accuracy'])
|
metrics_df = pd.DataFrame(columns=['top_1_accuracy', 'top_5_accuracy'])
|
||||||
new_row = pd.DataFrame({'top_1_accuracy': np.mean(top_1_accuracy), 'top_5_accuracy': np.mean(top_5_accuracy)}, index=[0])
|
|
||||||
|
new_row = pd.DataFrame([{'top_1_accuracy': np.mean(top_1_accuracy.numpy()), 'top_5_accuracy': np.mean(top_5_accuracy.numpy())}])
|
||||||
metrics_df = pd.concat([metrics_df, new_row], ignore_index=True)
|
metrics_df = pd.concat([metrics_df, new_row], ignore_index=True)
|
||||||
metrics_df.to_csv(metrics_file, index=False)
|
metrics_df.to_csv(metrics_file, index=False)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user