Hey @ptrblck
I think the looping works:
    train_loader = DataLoader(train_set, batch_size=1, shuffle=True, num_workers=8)
    print(len(train_loader))
    # x, y, z = next(iter(train_loader))
    # print(x.shape, '\n', y.shape, '\n', z) #torch.Size([1, 192, 1, 16, 64, 64])
                                           #torch.Size([1, 192, 9, 8, 32, 32])
    model = UNet3D(in_channel=1, n_classes=9).to(device)
    bSize = 4
    # the loop below would be within epochs
    for idx, sample in enumerate(train_loader):
        print('idx: {}'.format(idx), 'sub: {}'.format(sample[2]))
        for i in range(0, sample[0].shape[1], bSize):
            img = sample[0][0, i:i+bSize, 0, :, :, :] # creating batches
            img = img.unsqueeze(1)
            # print(img.shape)
            seg = sample[1][0, i:i+bSize, 0:9, :, :, :]
            # print(seg.shape)
            img, seg = img.to(device), seg.to(device)
            out = model(img)
            # print('Out: {}'.format(out.shape))

The same code also iterates the main subject images, creates the patches from each inside Dataset, takes samples from Dataloader, and chunks from sample fed to GPU/model at a time.
Thanks.
Is there a better way to check that correct data are sent to the model, apart from the tensor shape?
Just out of curiosity, are there Pytorch functionality for that? Some of the posts I have seen has words like Torchnet, ConcatDataset, ChunkSize and things like that?