Course project help

Hey, i am doing my course project for zerotogans and i keep getting this error and i dont know whats wrong with my code, can someone please take a look at it.
here is the link to my notebook - bhandari2003anurag/zerotogans-project - Jovian

Try running it with CPU instead of GPU, the errors should be more specific.
There’s also many warnings about incorrect number of workers - this can be a problem as well.

i used cpu as u said , but now this error comes up and i searched for it online and somewhere it is mentioned that this error comes up when the class number starts from 1 and pytorch requires class no to start from 0, but here the classes do start from 0.

You have 131 possible classes, but only 121 outputs in your model. This means that any class above 120 doesn’t have it’s output representation in your model.

Easy fix, just use the correct number of outputs :stuck_out_tongue:

i did it but now this error shows and ig its to do with res3 layer but i cant just figure it out, any thoughts?
notebook - bhandari2003anurag/zerotogans-project - Jovian

This seems quite impossible given how the model was able to handle it without a different error, but I would try checking the sizes of images in training dataset - perhaps one of them is smaller than the others.

To do so, iterate over them (or batches and then over images) and add their shape to a set(). Then just print it - should show you shapes of the input images.