I am trying to save some values from my training model as DataFrame which works okay but it only save a data for the first loop and it stops. I have tried to put it in a For loop but didn't help. What ways is available for me please to save for the whole training?
df=pd.DataFrame({'Image_Name':names_preds, 'Target':targets.detach(), 'Prediction':preds.detach()})
print(df)
df.to_csv(r'test5.csv', index=False)