MCG-NJU/MixFormerV2

二阶段训练错误IndexError: list index out of range

capf-2011 opened this issue · 2 comments

您好,首先感谢您的工作,我复现的时候发现,训练第二阶段报错,请问怎么解决,谢谢!
list index out of range
Training crashed at epoch 1
Traceback for the error!
Traceback (most recent call last):
File "K:\pycharm_project\MixFormerV2\lib\train../..\lib\train\trainers\base_trainer.py", line 88, in train
self.train_epoch()
File "K:\pycharm_project\MixFormerV2\lib\train../..\lib\train\trainers\ltr_trainer.py", line 117, in train_epoch
self.cycle_dataset(loader)
File "K:\pycharm_project\MixFormerV2\lib\train../..\lib\train\trainers\ltr_trainer.py", line 82, in cycle_dataset
loss, stats = self.actor(data, remove_rate_cur_epoch)
File "K:\pycharm_project\MixFormerV2\lib\train../..\lib\train\actors\mixformer_distill_st2.py", line 54, in call
loss, status = self.compute_losses(out_dict, out_dict_teacher, gt_bboxes[0], labels=labels)
File "K:\pycharm_project\MixFormerV2\lib\train../..\lib\train\actors\mixformer_distill_st2.py", line 95, in compute_losses
distill_loss_logits, distill_loss_feat = self.compute_losses_distill(pred_dict, pred_dict_teacher)
File "K:\pycharm_project\MixFormerV2\lib\train../..\lib\train\actors\mixformer_distill_st2.py", line 169, in compute_losses_distill
dist_feat_stu = torch.stack([pred_dict['distill_feat_list'][i] for i in index_s], dim=0)
File "K:\pycharm_project\MixFormerV2\lib\train../..\lib\train\actors\mixformer_distill_st2.py", line 169, in
dist_feat_stu = torch.stack([pred_dict['distill_feat_list'][i] for i in index_s], dim=0)
IndexError: list index out of range

Restarting training from last epoch ...
Finished training!

Process finished with exit code 0

是不是在remove阶段的错误,是有个typo,把配置文件中 experiments/mixformer2_vit_stu/student_288_depth12to8.yaml中 MODEL.BACKBONE.DEPTH 改成12。我稍后会修正

是不是在remove阶段的错误,是有个typo,把配置文件中 experiments/mixformer2_vit_stu/student_288_depth12to8.yaml中 MODEL.BACKBONE.DEPTH 改成12。我稍后会修正

可以了,谢谢