yaoyao-liu / class-incremental-learning

PyTorch implementation of AANets (CVPR 2021) and Mnemonics Training (CVPR 2020 Oral)
https://class-il.mpi-inf.mpg.de
MIT License
461 stars 71 forks source link

Running errors #32

Open gujinjing opened 2 years ago

gujinjing commented 2 years ago

Hi, Professors. there are bugs when I run the code. Can you explain what they mean and how to solve the problems? Thank you very much!

python main.py --nb_cl_fg=50 --nb_cl=10 --gpu=0 --random_seed=1993 --baseline=lucir --branch_mode=dual --branch_1=ss --branch_2=free --dataset=cifar100

Traceback (most recent call last): File "main.py", line 436, in train(config, training_chunked_samples_dir, testing_chunked_samples_file) File "main.py", line 238, in train X_valid_ori, Y_valid_ori, X_valid_cumul, Y_valid_cumul, iteration, is_start_iteration, top1_acc_list_ori, top1_acc_list_cumul) File "/data/gjj/code/hf2vad/cil/AANet/trainer/base_trainer.py", line 792, in compute_acc order_list, is_start_iteration=is_start_iteration) File "/data/gjj/code/hf2vad/cil/AANet/utils/incremental/compute_accuracy.py", line 78, in compute_accuracy sqd_icarl = cdist(class_means[:,:,0].T, outputs_feature.cpu(), 'sqeuclidean') File "/home/gjj/anaconda3/envs/py36/lib/python3.6/site-packages/scipy/spatial/distance.py", line 2710, in cdist raise ValueError('XB must be a 2-dimensional array.')

yaoyao-liu commented 2 years ago

Thanks for your interest in our work.

May I know whether you are using PyTorch 1.2.0?

gujinjing commented 2 years ago

no, I use PyTorch 1.6.0.

yaoyao-liu commented 2 years ago

I think this error can be solved by using PyTorch 1.2.0.

If you don't want to change your PyTorch version, maybe you need to set a breakpoint there and update the corresponding lines.