Hi Everyone,
I am a beginner in the area of Machine Learning/Deep Learning. I have completed lesson-1 of course-v3, and now I am trying to apply the same method (cat-dogs) to train a model that can predict the class of chemical compounds, either azulene or flavonol (these two classes of compounds have a significant difference in their chemical structure). I have a folder with 25 images of azulene derivatives and 25 images of flavanol derivatives. The images are labeled as Azulene_1, Azulene_2…Azuelene_25 and Flavanol_1, Flavanol_2…Flavanol_25. I was hoping that the trained model would predict whether the test set images are azulenes or flavonols. I am getting an issue when I run the following command:
data = ImageDataBunch.from_name_re(path_img, fnames, pat, ds_tfms=get_transforms(), size=224, bs=40)
data.normalize(imagenet_stats)
Issue:
/usr/local/lib/python3.6/dist-packages/fastai/data_block.py:541: UserWarning: You are labelling your items with CategoryList.
Your valid set contained the following unknown labels, the corresponding items have been discarded.
Flavonol_20, Azulene_11, Azulene_7, Azulene_19, Flavonol_12…
if getattr(ds, ‘warn’, False): warn(ds.warn)
ImageDataBunch;
Train: LabelList (40 items)
x: ImageList
Image (3, 224, 224),Image (3, 224, 224),Image (3, 224, 224),Image (3, 224, 224),Image (3, 224, 224)
y: CategoryList
Azulene_15,Azulene_23,Azulene_9,Azulene_8,Flavonol_9
Path: /content/gdrive/MyDrive/Colab Notebooks/DL-Project/DL-1-Project/Train;
Valid: LabelList (0 items)
x: ImageList
y: CategoryList
Path: /content/gdrive/MyDrive/Colab Notebooks/DL-Project/DL-1-Project/Train;
Test: None
1.Why is my validation set empty? Why are my items being discarded? How do I fix the issue?
2. I was receiving an error indicating that the training dataloader is empty. I resolved that issue by changing bs=40 (assuming 40 is the total number of items in the training set). Any number below or above 40 is giving me an error. It would be of great help if anyone could explain to me the reason.
Thank you so much for your time!
Khushboo