I am using an ImageFolder to access my Google Drive folder in Colab and then using Dataloader to load the Images from four classes. Now I want to know the shape of the test-class.
# choose the training and test datasets
train_data = datasets.ImageFolder(data+"/train", transform=transform_train)
test_data = datasets.ImageFolder(data+"/val", transform = transform_test)
#n_classes = test_data.shape[1]

dataloader_train = torch.utils.data.DataLoader(train_data, batch_size=32, shuffle=True, num_workers=2)
dataloader_test = torch.utils.data.DataLoader(test_data, batch_size=32, num_workers=2)
n_classes = dataloader_test.shape[1]

Each time I try to do this, resulting error like this -
AttributeError: 'DataLoader' object has no attribute 'shape' or
AttributeError: 'ImageFolder' object has no attribute 'shape'
Any idea how can I print the shape of the test class?