Getting Validation Accuracy with validation_epoch_end #8240
Answered
by
TehJimmmyy
TehJimmmyy
asked this question in
Lightning Trainer API: Trainer, LightningModule, LightningDataModule
-
Hello i managed to implement training accuracy per epoch with training_epoch_end but i want to do the same with validation accuracy with validation_epoch_end but i get an error of "too many indices for tensor of dimension 0" when train.fit() . I am using pytorch-lightning==1.2.8 . Thanks in advance. Error is:
|
Beta Was this translation helpful? Give feedback.
Answered by
TehJimmmyy
Jul 1, 2021
Replies: 1 comment
-
I am a fool , i forgot to add return {"loss": loss, "predictions": outputs, "labels": labels} in the validation step. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
TehJimmmyy
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am a fool , i forgot to add return {"loss": loss, "predictions": outputs, "labels": labels} in the validation step.