DataLoader but with strings not in GPU memory? #9340
Unanswered
turian
asked this question in
Lightning Trainer API: Trainer, LightningModule, LightningDataModule
Replies: 1 comment 7 replies
-
Hey @turian, Only torch.tensor are moved to the GPU. A string won't be moved, so I am not sure to fully follow your questions. Would you mind to share a script to better explain your problem ? Best, |
Beta Was this translation helpful? Give feedback.
7 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.
-
I have a DataLoader reading from a DataSet, where each instance is
(x, y, string)
.x and y are tensors I want loaded to GPU memory, which is great because pl does that for me.
However, I don't want the string in GPU memory, since it is only used for crossreferencing another table for scoring.
Or is there a workaround that I can use to do my string lookups?
Beta Was this translation helpful? Give feedback.
All reactions