When I loop over the train datalader  as -->
setting up the train data loader
!pip install git+https://github.com/ildoonet/cutmix
from cutmix.cutmix import CutMix

train_dataloader = CutMix(train_dataset, 
                          num_class=104, 
                          beta=1.0, 
                          prob=0.5, 
                          num_mix=2)

for inputs, labels in train_dataloader:
    if torch.cuda.is_available():
        inputs = inputs.cuda()
        labels = labels.cuda()

it did not produce any error
Whereas;
When I loop over the validation datalader  as -->
setting up the val data loader
from torch.utils.data import DataLoader

val_dataloader = DataLoader(val_dataset,
                        shuffle=False,
                        num_workers=4,
                        batch_size=128
                       )

for inputs, labels in val_dataloader:
    if torch.cuda.is_available():
        inputs = inputs.cuda()
        labels = labels.cuda()

it is producing the error . Can’t able to figure out where am I going wrong .