CanPeng123 / FSCIL_ALICE

28 stars 6 forks source link

Data loader issues #4

Closed ihaeyong closed 1 year ago

ihaeyong commented 1 year ago

This part of the code looks weird.

https://github.com/CanPeng123/FSCIL_ALICE/blob/4c76fe1c4f5b6baac5af0293569ad0baf225ae0a/alice/dataloader/data_utils.py#L93

CanPeng123 commented 1 year ago

Hi,

After base session training, we freeze the feature extractor and use NCM for classification. Thus, after the base session, there is no training on the model. The few-shot data from the incremental sessions are only used for class-wise prototype generation. For each incremental class, the average feature from the training data is used as the class-wise prototype. When the class-wise prototypes are generated, they will be stored for classification. As the feature exactor is not further trained for incremental sessions, storing the prototypes or every time generating the prototype for each class will give the same results.

Hope this could clarify your confusion.

ihaeyong commented 1 year ago

Hi,

After base session training, we freeze the feature extractor and use NCM for classification. Thus, after the base session, there is no training on the model. The few-shot data from the incremental sessions are only used for class-wise prototype generation. For each incremental class, the average feature from the training data is used as the class-wise prototype. When the class-wise prototypes are generated, they will be stored for classification. As the feature exactor is not further trained for incremental sessions, storing the prototypes or every time generating the prototype for each class will give the same results.

Hope this could clarify your confusion.

Thank you for your comments and your public codes. I hope this part of the code can not access previously learned model parameters and prototypes in the process of FSCIL.

Bests.

CanPeng123 commented 1 year ago

We decouple the learning of representations and classifiers to avoid overfitting and catastrophic forgetting in the representations. After the base session, there is no model updating in the following incremental sessions. The feature extractor is frozen after base session training and it is kept for all the following incremental steps similar to open-set tasks. Then we use NCM instead of a trained FC classifier to do the classification. The balanced class-wise average features are used for classification. As only a frozen feature extractor from the base session and class-wise prototypes are maintained, there is no extra old information stored.

Hope this could clarify the confusion.

ihaeyong commented 1 year ago

Thanks for your kind response.

Okay, the code is used to acquire the balanced class-wised average prototypes.