How Does MultipackBatchSampler Handle Triple-Nested Lists? #2310
-
|
Hello! I have a question about how the However, my understanding is that a BatchSampler typically returns a nested list with batches structured like this: This triple nesting is unexpected and doesn't align with the usual behavior of BatchSampler. Am I missing something in the implementation or intended design? Any clarification would be greatly appreciated. Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
This is from my understanding of reading the code. We pre-compute batches of mini-batch using |
Beta Was this translation helpful? Give feedback.
This is from my understanding of reading the code. We pre-compute batches of mini-batch using
generate_batches(resulting in 3D). Then, during__iter__, we iterate over this 3D, returning 2D batches (like BatchSampler are used to). This allows us to pre-compute the batch efficiently.