mmasana / FACIL

Framework for Analysis of Class-Incremental Learning with 12 state-of-the-art methods and 3 baselines.
https://arxiv.org/pdf/2010.15277.pdf
MIT License
512 stars 98 forks source link

Varying the number of classes among the tasks #32

Open andreadaou opened 1 year ago

andreadaou commented 1 year ago

Hello !

In Class-incremental learning: survey and performance evaluation on image classification, large domain shift is studied. In this section, the number of classes varies among the tasks (i.e., starting with 102 classes then adding 67 classes then 200, etc.).

Is it possible to specify the number of classes for each task? Because in the code, I only found the possibility of specifying the --nc-first-task (number of classes of the first task) and --num-tasks (total number of tasks).

Thank you in advance !!

mmasana commented 1 year ago

Hi Andrea,

the way that we handled that setting is by using multiple dataset entries. You can just have different entries in the dataset_config.py, each with a different number of classes, and then you pass all of those dataset key names after the argument --datasets.

This can also be used to have a varying number of classes for the same dataset by creating multiple entries dataset-name-task1, dataset-name-task2, ... , dataset-name-taskN which each has all the same specifications except for a different number of classes, specified with the 'class_order': key followed by the list of classes specific on that task.

Hope that helps!

andreadaou commented 1 year ago

Okay, thank you!!