Issue with ImageNet-Subset
Opened this issue · 3 comments
I ran the finetuning script for imagenet-subset
python src/main_incremental.py --approach finetuning --nepochs 200 --batch-size 128 --num-workers 4 --datasets imagenet_subset --num-tasks 12 --nc-first-task 25 --lr 0.05 --weight-decay 1e-3 --clipping 1 --network resnet32 --momentum 0.9 --exp-name exp1 --seed 0
But I am getting this syntactical error
Has somebody got such an issue?
If you are running experiments on ImageNet, you probably want to replace --network resnet32
by a network which expects and input of 224x224, such as ResNet-18.
Alternatively, you could resize the images to the input size of ResNet-32, which is 32x32. But I guess the other option is closer that what you want.
Thank you so much.
I used resnet-18 instead and it works
Have you simulated in tiny-imagenet-200?
the get_data() method in line 72 in data_loader.py does not work because the data directory in tiny-imagenet-200 is different than other ImageNet version.
For the tiny-imagenet-200, you can use the instructions here to be able to generate the dataset splits. You basically generate the train.txt
and test.txt
with the paths however you have them.
For example, in the train.txt
you could have something like this:
tiny_imagenet_200/train/n02124075/images/n02124075_3.JPEG 0
tiny_imagenet_200/train/n02124075/images/n02124075_133.JPEG 0
tiny_imagenet_200/train/n02124075/images/n02124075_461.JPEG 0
tiny_imagenet_200/train/n02124075/images/n02124075_450.JPEG 0
tiny_imagenet_200/train/n02124075/images/n02124075_303.JPEG 0
tiny_imagenet_200/train/n02124075/images/n02124075_374.JPEG 0
tiny_imagenet_200/train/n02124075/images/n02124075_79.JPEG 0
tiny_imagenet_200/train/n02124075/images/n02124075_100.JPEG 0
...