DataLoader doesn't add batch size - PyTorch Forums
discuss.pytorch.org › t › dataloader-doesnt-addOct 08, 2019 · Hello, i wrote my own Dataset and tried to put it in DataLoader. All seems to work, but the loaded data doesn’t get the batch size. I have a 3x64x64 RGB image and a 1x64x64 grayscale image and concatenate them in my Dataset to get a 4x64x64. After using the Dataloader the output should have the shape 64x4x64x64 (batchsize=64) but it still has 4x64x64. Any suggestions or ideas? class ...
torch.utils.data — PyTorch 1.10.1 documentation
https://pytorch.org/docs/stable/data.htmlDataLoader supports automatically collating individual fetched data samples into batches via arguments batch_size, drop_last, and batch_sampler. Automatic batching (default) ¶ This is the most common case, and corresponds to fetching a minibatch of data and collating them into batched samples, i.e., containing Tensors with one dimension being the batch dimension …