From df49f763d7b3093aa304e075ce31ef4c73e8accc Mon Sep 17 00:00:00 2001 From: Fabrice Daian <fabrice.daian@lis-lab.fr> Date: Mon, 3 Mar 2025 10:23:14 +0100 Subject: [PATCH] update --- mupixutils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mupixutils.py b/mupixutils.py index 97fa40f..1e41505 100644 --- a/mupixutils.py +++ b/mupixutils.py @@ -190,7 +190,7 @@ def train(d_model, g_model, gan_model, dataset, output_path, val_dataset = None, val_loss = mse/((ssim+1)/2) # scaling ssim on 0,1 instead of -1,1 : trouble when ssim is <0 with open(output_path+"/log.txt", 'a') as file: # file.write("[Loss] Val loss at epoch %d : MSE[%.3e], SSIM[%.3e], Validation_Loss[%.3e]\n"%(current_epoch,mse,ssim,val_loss)) - file.write("[Loss] Val loss at epoch ",str(current_epoch)," : MSE[",str(mse),"], SSIM[",str(ssim),"], Validation_Loss[",str(val_loss),"]\n") + file.write("[Loss] Val loss at epoch "+str(current_epoch)+" : MSE["+str(mse)+"], SSIM["+str(ssim)+"], Validation_Loss["+str(val_loss)+"]\n") if val_loss < best_val_loss: best_val_loss = np.copy(val_loss) g_model.save(output_path+"/networks/Generator") @@ -214,7 +214,7 @@ def train(d_model, g_model, gan_model, dataset, output_path, val_dataset = None, else : with open(output_path+"/log.txt", 'a') as file: # file.write("[Patience]: Reached at epoch %d with best validation loss :[%.3e]\n"%(current_epoch,val_loss)) - file.write("[Patience]: Reached at epoch ",str(current_epoch),"with best validation loss :[",str(val_loss),"]\n") + file.write("[Patience]: Reached at epoch "+str(current_epoch)+"with best validation loss :["+str(val_loss)+"]\n") break gc.collect() -- GitLab