xfflzl/CIM-CIL

I split my dataset into 10 classes, and I set init cls to 10, again reporting IndexError: Target 853 is out of bounds. How should this kind of mistake be solved

BLACKJACK0711 opened this issue · 5 comments

I split my dataset into 10 classes, and I set init cls to 10, again reporting IndexError: Target 853 is out of bounds. How should this kind of mistake be solved
xfflzl commented

Hi, could you please share your folder architecture of your dataset?

Hi, could you please share your folder architecture of your dataset?

Thank you for your concern about this issue. Please check your email for relevant introduction

xfflzl commented

Hi, thanks for your introduction! The datasets used in this repo are image datasets and the data folders of them are organized like following.

dataset main folder
├── train
    ├── class 0
        ├── class 0 train image 0
        ├── class 0 train image 1
        ├── ...
    ├── class 1
        ├── class 1 train image 0
        ├── class 1 train image 1
        ├── ...
    ├── ...
├── test
    ├── class 0
        ├── class 0 test image 0
        ├── ...
    ├── class 1
        ├── class 1 test image 0
        ├── ...
    ├── ...

With such folder architecture, the data files will be correctly read by torchvision.datasets.ImageFolder. You can find details from dataset loading classes called iImageNet1000, iImageNet100 and iVGGFace200 in utils/data.py.

To run this repo, please make sure your dataset samples are images and they are put in correct folders.

xfflzl commented

Hi, it seems that the images are removed in the email.