Commit 64a8f5dd authored by zpgeng's avatar zpgeng
Browse files

Fix small error w.r.t. utils.py

parent 7f2b30c8
...@@ -75,7 +75,7 @@ def save_logs(hist, output_directory, model, pytorch=False): ...@@ -75,7 +75,7 @@ def save_logs(hist, output_directory, model, pytorch=False):
#df_metrics = pd.DataFrame(df_metrics) #df_metrics = pd.DataFrame(df_metrics)
#df_metrics.to_csv(output_directory + '/' + model + '_' + 'df_metrics.csv', index=False) #df_metrics.to_csv(output_directory + '/' + model + '_' + 'df_metrics.csv', index=False)
index_best_model = hist_df['loss'].idxmin() index_best_model = hist_df['val_accuracy'].idxmax()
row_best_model = hist_df.loc[index_best_model] row_best_model = hist_df.loc[index_best_model]
df_best_model = pd.DataFrame(data=np.zeros((1, 4), dtype=np.float), index=[0], df_best_model = pd.DataFrame(data=np.zeros((1, 4), dtype=np.float), index=[0],
...@@ -83,8 +83,8 @@ def save_logs(hist, output_directory, model, pytorch=False): ...@@ -83,8 +83,8 @@ def save_logs(hist, output_directory, model, pytorch=False):
df_best_model['best_model_train_loss'] = row_best_model['loss'] df_best_model['best_model_train_loss'] = row_best_model['loss']
df_best_model['best_model_val_loss'] = row_best_model['val_loss'] df_best_model['best_model_val_loss'] = row_best_model['val_loss']
df_best_model['best_model_train_acc'] = row_best_model['acc'] df_best_model['best_model_train_acc'] = row_best_model['accuracy']
df_best_model['best_model_val_acc'] = row_best_model['val_acc'] df_best_model['best_model_val_acc'] = row_best_model['val_accuracy']
df_best_model.to_csv(output_directory + '/' + model + '_' + 'df_best_model.csv', index=False) df_best_model.to_csv(output_directory + '/' + model + '_' + 'df_best_model.csv', index=False)
except: except:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment