Error while trying to log accuracy #7739
Unanswered
sushmit86
asked this question in
Lightning Trainer API: Trainer, LightningModule, LightningDataModule
Replies: 2 comments
-
Hi, should be an easy fix. The problem is in training step where you define
but it should be defined in the constructor
Hope this helps. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thanks for the reply |
Beta Was this translation helpful? Give feedback.
0 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.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all -
I am new to using Pytorch as well as pytorch_lightning. I am getting an error while trying to log accuracy during the training step.
Here is my code below
However I am getting an error
RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu!
Any help on this
Beta Was this translation helpful? Give feedback.
All reactions