Compare commits
2 Commits
bdaba18487
...
1ee4b4103d
Author | SHA1 | Date | |
---|---|---|---|
|
1ee4b4103d | ||
|
5e19ff3ce8 |
@ -8,7 +8,6 @@ import os
|
|||||||
|
|
||||||
model = tf.keras.models.load_model('model.h5')
|
model = tf.keras.models.load_model('model.h5')
|
||||||
|
|
||||||
|
|
||||||
test_data = pd.read_csv('data.csv', sep=';')
|
test_data = pd.read_csv('data.csv', sep=';')
|
||||||
test_data = pd.get_dummies(test_data, columns=['Sex', 'Medal'])
|
test_data = pd.get_dummies(test_data, columns=['Sex', 'Medal'])
|
||||||
test_data = test_data.drop(columns=['Name', 'Team', 'NOC', 'Games', 'Year', 'Season', 'City', 'Sport', 'Event'])
|
test_data = test_data.drop(columns=['Name', 'Team', 'NOC', 'Games', 'Year', 'Season', 'City', 'Sport', 'Event'])
|
||||||
@ -33,7 +32,9 @@ 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'])
|
||||||
metrics_df = metrics_df.concat({'top_1_accuracy': np.mean(top_1_accuracy), 'top_5_accuracy': np.mean(top_5_accuracy)}, ignore_index=True)
|
|
||||||
|
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.to_csv(metrics_file, index=False)
|
metrics_df.to_csv(metrics_file, index=False)
|
||||||
|
|
||||||
plt.figure(figsize=(10, 6))
|
plt.figure(figsize=(10, 6))
|
||||||
|
Loading…
Reference in New Issue
Block a user