Doing the sampling of batch indexes inside lightning #10741
Answered
by
rohitgr7
pamparana34
asked this question in
Lightning Trainer API: Trainer, LightningModule, LightningDataModule
-
I am trying to port my very old pytorch code to lightning and in my training loop, I have something as follows:
I was wondering how I can incorporate this batch index selection in the lightning code. In my code, I have the usual:
But I do not know where I can inject my sampling code inside all this. |
Beta Was this translation helpful? Give feedback.
Answered by
rohitgr7
Nov 25, 2021
Replies: 1 comment
-
I think that's the job of the PyTorch sampler. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
tchaton
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I think that's the job of the PyTorch sampler.