Hi,
The dataloader definition looks OK. Have you tried printing the inputs and targets inside your loop?
Have you checked that your dataset definition is correct? You could try accessing one dataset element with sample = training_samples[0] to check if the output is as expected.
Also, I believe you could vectorize that labels conversion by performing labels = labels - 1