I am working on the dataset from the Kaggle Seedling playground competition. This has the data in a train and test folder, in imagenet format. I want to use valid_pct = 0.2 to create a validation set, then compare with the result on the test set, i.e. the data is as follows:
path\
train\
clas1\
clas2\
...
...
test\
np.random.seed(1)
data = ImageDataBunch.from_folder(path = p,
size = 224,
ds_tfms = get_transforms(),
bs = bs,
valid_pct = 0.2,
train = 'train',
test = 'test')
data = data.normalize()
print(data.classes)
len(data.classes),data.c
gives me the following output:
[âBlack-grassâ, âCharlockâ, âCleaversâ, âCommon Chickweedâ, âCommon wheatâ, âFat Henâ, âLoose Silky-bentâ, âMaizeâ, âScentless Mayweedâ, âShepherds Purseâ, âSmall-flowered Cranesbillâ, âSugar beetâ, âtestâ]
(13, 13)
whereas there should only be 12 classes. I have checked that there is no folder called âtestâ in the train folder
Iâm guessing the function expects either âtrainâ and âvalidâ and âtestâ or just âtrainâ, but not âtrainâ and âtestâ??