Closed vponcelo closed 5 years ago
Hi,
Yes you are right. The code (largely borrow from pytorch official examples) decides the class order by walking through the dataset directories, so the train/test folders should be exactly aligned. As for your problem, I would suggest you carefully inspecting the "target" with pdb to check if the class labels are non-negative integers and correct, i.e. smaller than the number of total classes.
As for your another question, I would suggest you referring to "Zero-shot classification" problems. I think it's a different setting where you should combine other approaches with our architectures.
Hi,
I am facing the following problem when I attempt to train the network with:
The assertion error also occurs in the line 362:
Training and testing images are 64x128, and I also tried by resizing only the training images to 256x256.
It seems to be caused by an inconsistency with the number of classes that I am trying to figure out. In the evaluation, it might occur that there are no samples for some of the test classes, which I noticed it can be problematic for your network if the directory classes do not match properly. A successful solution I have found for this in another dataset I am working is to create the same set of class-directories with exactly the same name both in training
train
and testingval
partitions, leaving empty those class-directories where there are no samples for that class in testing. In this dataset, however, I get that error which is a bit confusing to me.Another question I have is whether your network can be used to classify images of classes that exist in the test partition but not in the train partition. For instance, in a dataset where half of the classes are used for training and the other half for testing.
I would appreciate any comment if you have any clue about what might be causing that error and the last question about the classes.
Thanks a lot