While first time execution of train_dl works fine, Rerunning the cell prompts me ““TypeError: batch must contain numbers, dicts or lists; found <class ‘torch.FloatTensor’>””".Isn’t a batch supposed to be a tensor?
ds_trans = transforms.Compose([transforms.Scale(224),
                               transforms.CenterCrop(224),
                               transforms.ToTensor(),
                               normalize])
ds_trans_t = transforms.Compose([transforms.Scale(224),
                               transforms.CenterCrop(224),
                               transforms.ToTensor(),
                               normalize])
train_ds = DogsDataset(train, data_dir+'train/', transform=ds_trans)
valid_ds = DogsDataset(valid, data_dir+'train/', transform=ds_trans)

train_dl = DataLoader(train_ds, batch_size=32, shuffle=True, num_workers=4)
valid_dl = DataLoader(valid_ds, batch_size=32, shuffle=False, num_workers=4)
#Error in this line.
inputs, labels = next(iter(train_dl))