I printed x after the for image, label in dataloader: line and the for loop line were completed, and I got the result of None, and I found that for image, label in dataloader: did not start the loop, so what is the reason, I Try to check the dataloader, there is an output, but the for loop is not started.
error:
x = x.cpu()
AttributeError: 'NoneType' object has no attribute 'cpu'
I printed x after the for image, label in dataloader: line and the for loop line were completed, and I got the result of None, and I found that for image, label in dataloader: did not start the loop, so what is the reason, I Try to check the dataloader, there is an output, but the for loop is not started.
error: x = x.cpu() AttributeError: 'NoneType' object has no attribute 'cpu'
code: print('dataset_this_rank',dataset_this_rank) dataloader = DataLoader(dataset_this_rank, **kwargs) x = None y_np = [] idx = 0 print('dataloader',dataloader) print('before: ', x)
dataset: own food dataset, use sop loading style envs: torch:1.12.1,cuda:11.4