soumith / imagenet-multiGPU.torch

an imagenet example in torch.
BSD 2-Clause "Simplified" License
402 stars 158 forks source link

Which Class Labels To Indices In Output Tensor? #73

Open hsoule opened 8 years ago

hsoule commented 8 years ago

I have a map_clsloc.txt file from ILSVRC2015 and was wondering n02110185 3 Siberian_husky n02096294 4 Australian_terrier n02102040 5 English_springer n02066245 6 grey_whale n02509815 7 lesser_panda n02124075 8 Egyptian_cat n02417914 9 ibex if each index here matches the index in the output 1000 dimensional tensor. Thanks!

soumith commented 8 years ago

@hsoule it doesn't unfortunately

hsoule commented 8 years ago

Thanks for the clarification! It seems like dataset.lua loads the directories in a random order. I'm thinking of checking the order in which the different classes are being loaded and then creating a hashmap with that. Is there a better way to approach this problem?

soumith commented 8 years ago

The alternative is to add a sorting in the code so that the directories are loaded in a deterministic alphabetical order

hsoule commented 8 years ago

Absolutely. I was looking at the forceClasses variable in dataset.lua which could help with that, but I've already spent significant time training the models up to the 37th epoch, so I will try this first. If the ordering is random, then I will try that approach.

Thanks again for the sanity check.