Compute metrics every n batches #12487
Unanswered
Ch-rode
asked this question in
Lightning Trainer API: Trainer, LightningModule, LightningDataModule
Replies: 2 comments 19 replies
-
hey @Ch-rode ! what is loss_val = self.loss(model_out, targets)
...
self.loss_val_bn = self.loss(model_out, targets) #accumulate state is it a torchmetric instance? |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thank you for your answer.
|
Beta Was this translation helpful? Give feedback.
19 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello ! I'm trying to use Pytorch lightning but I don't have clear in my mind all the steps. Anyway I'm trying to calculate the train_loss (for example) not only for each step(=batch) or epochs but every n batches (i.e. 500) but I'm not sure how to compute it (compute, reset etc). I tried this approach but this is not working. Can you help me? thanks
Any other suggestion on the code is well appreciated !
Beta Was this translation helpful? Give feedback.
All reactions