DualNet icon indicating copy to clipboard operation
DualNet copied to clipboard

n_tasks is 17 but Core50 class is 50

Open ZhongKuang opened this issue 1 year ago • 1 comments

I directly executed the main file, but encountered an error in loader.py on line 106: assert n_classes % self.n_tasks == 0 I used the Core50 dataset, which has 50 classes, while n_tasks is set to 17. How should I handle this step? If I don't make any changes to this part, can the original code still run successfully? I'm not sure whether to modify the code because I trust your code. If you can answer my question, I would be very grateful.Thank you!

ZhongKuang avatar Apr 10 '24 14:04 ZhongKuang

I found a solution in the paper. You set the number of tasks to 17 for the miniImageNet dataset and to 10 for the Core50 dataset. Apparently, the number of tasks was not pre-specified in your .sh file, which led to n_tasks defaulting to 17. Consequently, this caused an error when I ran the Core50 dataset.

ZhongKuang avatar Apr 11 '24 06:04 ZhongKuang