Problems with creating a snake breed classifier

I’m trying to create a snake breed classifier only for 4 snake breeds (Python, Rattlesnake, Anaconda, King Cobras), based on the knowledge from lectures 1 and 2.

I followed the exact same procedure as Jeremy, however I am getting a couple of errors.

When I downloaded the images, I received a UserWarning saying:
Palette images with Transparency expressed in bytes should be converted to RGBA images
which I resolved with the help of this thread: UserWarning: Palette images

After that, while fine-tuning the model, I received the error saying The size of tensor a (144) must match the size of tensor b (196) at non-singleton dimension 3

Can someone please help me understand what is the cause of this problem? And help me resolve this problem?

If you’d like, I can provide access to the Kaggle notebook where I’m working.

It’d be good to link your notebook so the context can be seen. :slightly_smiling_face:

The more information, the better.

Thanks for replying @ForBo7 , but the problem was resolved. It was a simple error I’d been making in the dimensions and extensions of every image.
I eventually just removed all the collected data from DDG and decided to use a pre-existing dataset.

If you’d like to see the notebook, here it is: Snake Breeds Classifier using Transfer Learning | Kaggle
Here is the HF Space I have hosted the model on: Classifying snake breeds - a Hugging Face Space by UtkMal

1 Like