Skip to content
Discussion options

You must be logged in to vote

I would normally just have self.accuracy and use that in both the train and val steps. Is that incorrect?

I would say this is incorrect. You don't want to share the same metric state across training and validation. Otherwise you're mixing data, which will give misleading results compared to having dedicated train and val metric instances. Additionally, depending on how you log the metric value, the same instance could get reset at the end of the training and validation epoch. if you're running validation more frequently (e.g. using val_check_interval) this will be another problem.

cc @SkafteNicki @Borda @edenafek should we add this to the documentation for metrics in lightning? are ther…

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@nateraw
Comment options

@nateraw
Comment options

@ananthsub
Comment options

@nateraw
Comment options

@SkafteNicki
Comment options

Answer selected by nateraw
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment