Records in batches of DataLoader

How can we know the number of records in each batches of Dataloader

u can enumrate the DataLoader then print data.shape

Data loader Does not supports Indexing

This might work?

 for batch_idx, (data, target) in enumerate(train_loader):
            data, target = data.to(device), target.to(device)
           print(data.shape)