mttr2021 / MTTR

Apache License 2.0
646 stars 69 forks source link

ValueError: matrix contains invalid numeric entries #14

Open nankepan opened 2 years ago

nankepan commented 2 years ago

Hi, first of all, thank you for your wonderful work. When I ran the main.py to tain a model on a2d_sentences datasset, it occured an error at 23th epoch on this line : "_lsap_module.calculate_assignment(cost_matrix, maximize)".

I didn't change anything, how can I solve it?

the error is like: Traceback (most recent call last): File "/data1/liunian2/nkp/RVOS/MTTR-main/main.py", line 79, in run(process_id=0, args=args) File "/data1/liunian2/nkp/RVOS/MTTR-main/main.py", line 20, in run trainer.train() File "/data1/liunian2/nkp/RVOS/MTTR-main/trainer.py", line 142, in train loss_dict = self.criterion(outputs, targets) File "/home/liunian2/anaconda3/envs/mttr/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl return forward_call(*input, kwargs) File "/data1/liunian2/nkp/RVOS/MTTR-main/models/criterion.py", line 39, in forward losses = self.compute_criterion(outputs, targets, losses_to_compute=self.losses) File "/data1/liunian2/nkp/RVOS/MTTR-main/models/criterion.py", line 53, in compute_criterion indices = self.matcher(outputs, targets) File "/home/liunian2/anaconda3/envs/mttr/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl return forward_call(*input, *kwargs) File "/home/liunian2/anaconda3/envs/mttr/lib/python3.9/site-packages/torch/autograd/grad_mode.py", line 28, in decorate_context return func(args, kwargs) File "/data1/liunian2/nkp/RVOS/MTTR-main/models/matcher.py", line 81, in forward indices = [linear_sum_assignment(c[i]) for i, c in enumerate(C.split(num_traj_per_batch, -1))] File "/data1/liunian2/nkp/RVOS/MTTR-main/models/matcher.py", line 81, in indices = [linear_sum_assignment(c[i]) for i, c in enumerate(C.split(num_traj_per_batch, -1))] File "/home/liunian2/anaconda3/envs/mttr/lib/python3.9/site-packages/scipy/optimize/_lsap.py", line 86, in linear_sum_assignment return _lsap_module.calculate_assignment(cost_matrix, maximize) ValueError: matrix contains invalid numeric entries

Feiyu-Yao commented 2 years ago

Hi, I meet the same problem as you, have you solved this problem?

xiejialong commented 2 years ago

same problem!

canyetat commented 1 year ago

same problem! have you solved this problem?