YU1ut / imprinted-weights

Code for 'Low-Shot Learning with Imprinted Weights'
68 stars 24 forks source link

Transfer to another dataset #3

Closed Terahezi closed 5 years ago

Terahezi commented 5 years ago

Hi, I am trying to transfer your codes to another dataset. I modified some codes in loader.py. Also change some numbers in pretrain.py, models.py, imprint.py. The pretrain stage works just fine. But the result for imprinting is very bad, which I suppose should not be the case. Since pretraining works ok, i guess it has something to do with the numbers. So could you pleases give some suggestions as to where I might make mistakes? I suppose the 'num_classes' variable should be the same across 'models.py' and 'loader.py'? This variable denotes the number of base class, right? In your codes, 100 is the number of novel classes. 200 is the total number of classes. In my case, the number of novel classes is 20, total classes is 101. So I changed 100 to 20, 200 to 101.

Terahezi commented 5 years ago

NVM, problem solved! It should be 'target_stack == (i+81)' at line 149 in file imprint.py