Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with ImageNet-Subset #45

Open
kandeldeepak46 opened this issue Apr 22, 2024 · 3 comments
Open

Issue with ImageNet-Subset #45

kandeldeepak46 opened this issue Apr 22, 2024 · 3 comments

Comments

@kandeldeepak46
Copy link

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
image

Has somebody got such an issue?

@mmasana
Copy link
Owner

mmasana commented Apr 22, 2024

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.

@kandeldeepak46
Copy link
Author

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.

@mmasana
Copy link
Owner

mmasana commented Apr 26, 2024

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
...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants