Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Training accuracy #57

Closed
lorenzoFabbri opened this issue Aug 7, 2019 · 10 comments
Closed

Training accuracy #57

lorenzoFabbri opened this issue Aug 7, 2019 · 10 comments

Comments

@lorenzoFabbri
Copy link
Contributor

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!

@williamFalcon
Copy link
Contributor

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

@lorenzoFabbri
Copy link
Contributor Author

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.

@expectopatronum
Copy link
Contributor

@lorenzoFabbri Did you figure out how to do this? I am also trying to do this but don't know how...

@lorenzoFabbri
Copy link
Contributor Author

Hi. I actually decided not to use this library for that project. So I cannot help you!

@expectopatronum
Copy link
Contributor

@lorenzoFabbri Thanks a lot for the fast response!

@Yevgnen
Copy link

Yevgnen commented Mar 15, 2020

@lorenzoFabbri Do you have any suggestion for replacement?

@lorenzoFabbri
Copy link
Contributor Author

@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.

@Yevgnen
Copy link

Yevgnen commented Mar 15, 2020

@lorenzoFabbri Thanks for quick reply! May I ask which library you are using?😅

@williamFalcon
Copy link
Contributor

williamFalcon commented Mar 15, 2020

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

@lorenzoFabbri
Copy link
Contributor Author

@Yevgnen I actually used plain PyTorch. I didn't have to do fancy things, so I wrote my own functions for training and testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants