When I used your cde
val_dataloader = DataLoader(val_dataset,
                        shuffle=False,
                        num_workers=4,
                        batch_size=1
                       )

for idx, (inputs, labels) in enumerate(val_dataloader):
    print(idx)
    inputs = inputs.cuda()
    labels = labels.cuda()

it is getting error at every index for the string thing
image749×296 21.6 KB
and when
data, labels = val_dataset[0]
data, labels = data.cuda(), labels.cuda()

image750×178 16.8 KB
image793×643 63.5 KB