I am using the following code, but it showing the FileNotFoundError. I have tried several times, but could not run the code correctly. Can anyone please fix the error?
data_dir = ‘Cat_Dog_data/train’
transform = transforms.Compose([transforms.Resize((224,224)),
transforms.CenterCrop(224),
transforms.ToTensor()])
dataset = datasets.ImageFolder(data_dir, transform=transform)
dataloader = torch.utils.data.DataLoader(dataset, batch_size=32, shuffle=True)
Capture998×524 37.1 KB