Ok I think I see the problem in your for loop that defines the data here:
for idx, (data,label) in enumerate(data):

you define one of the outputs as data and your input is data, so when you put data as the dataset for the dataloader it is just using the last output of the for loop which doesn’t work. You just need to change the name of your outputs like (inputs, labels) or something.