There seems to be a large collection of posts all over pytorch that makes it difficult to solve this issue. I have collected a list of all of them hopefully making things easier for all of us. Here:

How to create batches of a list of varying dimension tensors? 673
How to create a dataloader with variable-size input
Using variable sized input - Is padding required? 216
DataLoader for various length of data 262
How to do padding based on lengths? 103

bucketing:

Tensorflow-esque bucket by sequence length 25


Also, Stack-overflow has a version of this question too:

  
      stackoverflow.com
  
  
      
    
  

  How does Pytorch Dataloader handle variable size data? 330



  python, pytorch, tensor, variable-length



  asked by
  
  
    Trung Le
  
  on 10:08AM - 07 Mar 19 UTC


  
  
    
    
  
  



crossposted: https://www.quora.com/unanswered/How-does-Pytorch-Dataloader-handle-variable-size-data 41