BNU-IVC / FastPoseGait

FastPoseGait is a user-friendly and flexible repository that aims to help researchers get started on pose-based gait recognition quickly.
64 stars 3 forks source link

训练GaitTR出现维度不匹配问题,IndexError: boolean index did not match indexed array along dimension 0; dimension is 1375 but corresponding boolean dimension is 5497就是这个问题怎么解决呢 #11

Closed Aucy1 closed 5 months ago

Aucy1 commented 5 months ago

IndexError: boolean index did not match indexed array along dimension 0; dimension is 1375 but corresponding boolean dimension is 5497

DreamShibei commented 5 months ago

Hi! Can you provide more detailed error information? The issue appears to arise during the facilitation of the evaluation, given that the sequence number for the CASIA-B test set is 5497.

Aucy1 commented 5 months ago

Traceback (most recent call last): File "/home/Code/Gait-Recognition/FastPoseGait/fastposegait/main.py", line 74, in run_model(cfgs, training) File "/home/Code/Gait-Recognition/FastPoseGait/fastposegait/main.py", line 56, in run_model Model.run_train(model) File "/home/Code/Gait-Recognition/FastPoseGait/fastposegait/modeling/base_model.py", line 435, in run_train result_dict = BaseModel.run_test(model) File "/home/Code/Gait-Recognition/FastPoseGait/fastposegait/modeling/base_model.py", line 471, in run_test return eval_func(info_dict, dataset_name, *valid_args) File "/home/Code/Gait-Recognition/FastPoseGait/fastposegait/evaluation/evaluator.py", line 138, in evaluate_indoor_dataset return single_view_gallery_evaluation( File "/home/Code/Gait-Recognition/FastPoseGait/fastposegait/evaluation/evaluator.py", line 96, in single_view_gallery_evaluation probe_x = feature[pseq_mask, :] IndexError: boolean index did not match indexed array along dimension 0; dimension is 1375 but corresponding boolean dimension is 5497 ERROR:torch.distributed.elastic.multiprocessing.api:failed (exitcode: 1) local_rank: 0 (pid: 16186) of binary: /home/anaconda3/envs/FPGait/bin/python Traceback (most recent call last): File "/home/anaconda3/envs/FPGait/bin/torchrun", line 8, in sys.exit(main()) File "/home/anaconda3/envs/FPGait/lib/python3.9/site-packages/torch/distributed/elastic/multiprocessing/errors/init.py", line 346, in wrapper return f(args, **kwargs) File "/home/anaconda3/envs/FPGait/lib/python3.9/site-packages/torch/distributed/run.py", line 794, in main run(args) File "/home/anaconda3/envs/FPGait/lib/python3.9/site-packages/torch/distributed/run.py", line 785, in run elastic_launch( File "/home/anaconda3/envs/FPGait/lib/python3.9/site-packages/torch/distributed/launcher/api.py", line 134, in call return launch_agent(self._config, self._entrypoint, list(args)) File "/home/anaconda3/envs/FPGait/lib/python3.9/site-packages/torch/distributed/launcher/api.py", line 250, in launch_agent raise ChildFailedError( torch.distributed.elastic.multiprocessing.errors.ChildFailedError:

fastposegait/main.py FAILED 具体错误是这样的

DreamShibei commented 5 months ago

Please check if there is any issue with this configuration line. The batch size during testing should be the same as the number of GPUs. If not, please provide me with more information.

Aucy1 commented 5 months ago

It's working, thank you very much!