I was wondering whether there is something like validation_end but for training (e.g., training_end). I want to compute the training accuracy at the end of each epoch. Thanks!
you can use hooks
(on_epoch_end)
https://williamfalcon.github.io/pytorch-lightning/Trainer/hooks/
there's a typo in that doc... but you're looking for on_epoch_end
Thanks but I'm having some difficulties.
If I save the accuracy from each training step, how can I compute the average accuracy? on_epoch_end does not take anything as input, so I cannot write something similar to validation_end. Thanks.
@lorenzoFabbri Did you figure out how to do this? I am also trying to do this but don't know how...
Hi. I actually decided not to use this library for that project. So I cannot help you!
@lorenzoFabbri Thanks a lot for the fast response!
@lorenzoFabbri Do you have any suggestion for replacement?
@Yevgnen Hi. I haven't use this library in a long time! Perhaps thins have changed in the meanwhile so I cannot really help you. I plan on giving it another try in the next few weeks, though.
@lorenzoFabbri Thanks for quick reply! May I ask which library you are using?😅
we introduced a full callbacks system now! give it a shot.
you can calculate the accuracy on epoch_end.
we’re also about to introduce:
on_training_epoch_end.
also, FYI: we now support TPUs and have a built in performance profiler
@Yevgnen I actually used plain PyTorch. I didn't have to do fancy things, so I wrote my own functions for training and testing.
Most helpful comment
Thanks but I'm having some difficulties.
If I save the accuracy from each training step, how can I compute the average accuracy?
on_epoch_enddoes not take anything as input, so I cannot write something similar tovalidation_end. Thanks.