qzp2018 / MCLN

This is a PyTorch implementation of MCLN proposed by our paper "Multi-branch Collaborative Learning Network for 3D Visual Grounding"(ECCV2024)
Other
10 stars 0 forks source link

RuntimeError: The size of tensor a (3) must match the size of tensor b (288) at non-singleton dimension 1 #6

Open GayStarc opened 1 month ago

GayStarc commented 1 month ago

I download all the dataset according to the instruction, but when I run sh scripts/train_scanrefer_mcln_sp.sh, I encoutered this fault. It seemed like the code you provided has some problems.

Traceback (most recent call last):
  File "train_dist_mod.py", line 353, in <module>
    ckpt_path = train_tester.main(opt)
  File "/root/autodl-tmp/MCLN/main_utils.py", line 433, in main
    self.train_one_epoch(
  File "/root/autodl-tmp/MCLN/main_utils.py", line 550, in train_one_epoch
    optimizer.step()
  File "/root/miniconda3/envs/mcln/lib/python3.8/site-packages/torch/optim/lr_scheduler.py", line 65, in wrapper
    return wrapped(*args, **kwargs)
  File "/root/miniconda3/envs/mcln/lib/python3.8/site-packages/torch/optim/optimizer.py", line 109, in wrapper
    return func(*args, **kwargs)
  File "/root/miniconda3/envs/mcln/lib/python3.8/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
    return func(*args, **kwargs)
  File "/root/miniconda3/envs/mcln/lib/python3.8/site-packages/torch/optim/adamw.py", line 161, in step
    adamw(params_with_grad,
  File "/root/miniconda3/envs/mcln/lib/python3.8/site-packages/torch/optim/adamw.py", line 218, in adamw
    func(params,
  File "/root/miniconda3/envs/mcln/lib/python3.8/site-packages/torch/optim/adamw.py", line 268, in _single_tensor_adamw
    exp_avg.mul_(beta1).add_(grad, alpha=1 - beta1)
RuntimeError: The size of tensor a (3) must match the size of tensor b (288) at non-singleton dimension 1
qzp2018 commented 4 weeks ago

Hello, did you download the latest code? I have updated my code for several times, and the newest code should work successfully.