In theory, it should work, since fetcher can take a list of tuple indexes.
  

      github.com
  

  
    pytorch/pytorch/blob/780faf52caf170a39414097654d325f6e128414e/torch/utils/data/_utils/fetch.py#L47-L52 13



      
      
          def fetch(self, possibly_batched_index):
              if self.auto_collation:
                  data = [self.dataset[idx] for idx in possibly_batched_index]
              else:
                  data = self.dataset[possibly_batched_index]
              return self.collate_fn(data)
      
    
  


  

  
    
    
  

  


For __getitem__, you can take a tuple of indexes to accomplish your request.