Too many values to unpack (expected 2) : pytorch classification

Can anyone please help me with this? I am not sure what is causing the error, I tried many ways but still the same error occurs. Thanks

x,y= dataloaders['train'] fails since you are indexing the dict to return the training DataLoader while assuming samples will be returned.
The samples (data and target) will be returned in the corresponding loop a few lines below:

for inputs, labels in dataloaders[phase]:

Thank you ptrblck, I understand what’s the problem here now.
So, what change do you suggest I should do to my code?

Remove x,y= dataloaders['train'] as it’s wrong and neither x nor y are used afterwards.