I have a trained model(my_model.pth) in pytorch, I want to visualize its accuracy and loss in a graph form. How can I do that?
Is it possible even if I finished my training process cause if I will retrain it, it will take a long time.
If you trained your model without any logging mechanism there is no way to plot it now. You can always evaluate your model in the test set and report accuracy (or other metrics) using visdom (as @MariosOreo stated) or tensorboardX.
But if you want to plot training loss and accuracy curves Iâm afraid you can only do it if you stored those numbers somewhere.
Does this mean I should save my log files to a text file and use that text file for plotting?
Yes. Either save log files, or save CSV/JSON files with loss per epoch per batch, or save event files with tensorboardX or visdom.
There is no way to recover stats after training if they were not saved in the first place.
http://dpaste.com/0T9A4GH in line 49 there is my loss. Is this the one I should save?
I was trying to save this to a text file like this:
f = open(âlogfile.txtâ, âaâ)
and at line 49 like this:
loss = f.write(âlog.txtâ, âaâ).
It gives me error, it says "â_io.TextIOWrapperâ object has no attribute âtraining_dataâ
"