Can you post the line that causes that issue? I can’t reproduce that on my end with
import torch

train_data = torch.rand(100, 32, 32)
data_len = len(train_data)
nchunks = 10
chunksiz = int(data_len/nchunks)
chunks = list()
for i in range(nchunks):
    start_idx = i*nchunks
    chunks.append(train_data[start_idx:start_idx+chunksiz])
print([chunk.shape for chunk in chunks])

[torch.Size([10, 32, 32]), torch.Size([10, 32, 32]), torch.Size([10, 32, 32]), torch.Size([10, 32, 32]), torch.Size([10, 32, 32]), torch.Size([10, 32, 32]), torch.Size([10, 32, 32]), torch.Size([10, 32, 32]), torch.Size([10, 32, 32]), torch.Size([10, 32, 32])]