Solved by ptrblck in post #2 
              
              
                Based on the error message some samples seem to have 160 channels while others have 163. 
Due to this, the collate_fn cannot stack the samples to a single batch and raises the error. 
Check the shape of each sample and make sure the channel dimension as well as the spatial size are the same.