qzp2018 / MCLN

This is a PyTorch implementation of MCLN proposed by our paper "Multi-branch Collaborative Learning Network for 3D Visual Grounding"(ECCV2024)
Other
11 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 1 month ago

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

LuoRiChangHong-2 commented 3 weeks ago

Sorry to bother you, but I am facing the same issue now. I downloaded the code this monday, which should has been the latest code. Any help would be appreciated.

qzp2018 commented 2 weeks ago

Sorry to bother you, but I am facing the same issue now. I downloaded the code this monday, which should has been the latest code. Any help would be appreciated.

Hi, did you use the same pytorch and python version with mine in the readme? I find the error python version is 3.8, and my python version is 3.7.

LuoRiChangHong-2 commented 2 weeks ago

Sorry to bother you, but I am facing the same issue now. I downloaded the code this monday, which should has been the latest code. Any help would be appreciated.

Hi, did you use the same pytorch and python version with mine in the readme? I find the error python version is 3.8, and my python version is 3.7.

I'm using python 3.7 now and the error is still there. Packages in my env are as follows: #

Name Version Build

_libgcc_mutex 0.1 conda_forge
_openmp_mutex 4.5 2_gnu
_sysroot_linux-64_curr_repodata_hack 3 haa98f57_10
backcall 0.2.0 pypi_0
binutils_impl_linux-64 2.36.1 h193b22a_2
binutils_linux-64 2.36 hf3e587d_10
blis 0.7.11 pypi_0
ca-certificates 2024.9.24 h06a4308_0
catalogue 2.0.10 pypi_0
certifi 2022.12.7 py37h06a4308_0
charset-normalizer 3.4.0 pypi_0
click 8.1.7 pypi_0
configparser 5.3.0 pypi_0
cudatoolkit 11.3.1 h2bc3f7f_2
cudnn 8.9.2.26 cuda11_0
cymem 2.0.8 pypi_0
decorator 5.1.1 pypi_0
docker-pycreds 0.4.0 pypi_0
einops 0.6.1 pypi_0
en-core-web-sm 3.3.0 pypi_0
filelock 3.12.2 pypi_0
fsspec 2023.1.0 pypi_0
gcc_impl_linux-64 10.4.0 h7ee1905_17
gcc_linux-64 10.4.0 h9215b83_10
gitdb 4.0.11 pypi_0
gitpython 3.1.43 pypi_0
gxx_impl_linux-64 10.4.0 h7ee1905_17
gxx_linux-64 10.4.0 h6e491c6_10
h5py 3.8.0 pypi_0
huggingface-hub 0.16.4 pypi_0
idna 3.10 pypi_0
importlib-metadata 6.7.0 pypi_0
ipdb 0.13.13 pypi_0
ipython 7.34.0 pypi_0
jedi 0.19.1 pypi_0
jinja2 3.1.4 pypi_0
kernel-headers_linux-64 3.10.0 h57e8cba_10
langcodes 3.3.0 pypi_0
ld_impl_linux-64 2.36.1 hea4e1c9_2
libffi 3.4.4 h6a678d5_1
libgcc 14.2.0 h77fa898_1
libgcc-devel_linux-64 10.4.0 h74af60c_17
libgcc-ng 14.2.0 h69a702a_1
libgomp 14.2.0 h77fa898_1
libnsl 2.0.0 h5eee18b_0
libprotobuf 3.20.3 h3eb15da_0
libsanitizer 10.4.0 hde28e3b_17
libsqlite 3.45.2 h2797004_0
libstdcxx 14.2.0 hc0a3c3a_1
libstdcxx-devel_linux-64 10.4.0 h74af60c_17
libstdcxx-ng 14.2.0 h4852527_1
libzlib 1.3.1 hb9d3cd8_2
llvmlite 0.39.1 pypi_0
markupsafe 2.1.5 pypi_0
matplotlib-inline 0.1.6 pypi_0
murmurhash 1.0.10 pypi_0
ncurses 6.4 h6a678d5_0
numba 0.56.4 pypi_0
numpy 1.21.6 pypi_0
openssl 3.0.15 h5eee18b_0
packaging 24.0 pypi_0
parso 0.8.4 pypi_0
pathtools 0.1.2 pypi_0
pathy 0.10.3 pypi_0
pexpect 4.9.0 pypi_0
pickleshare 0.7.5 pypi_0
pillow 9.5.0 pypi_0
pip 22.3.1 py37h06a4308_0
plyfile 0.9 pypi_0
preshed 3.0.9 pypi_0
promise 2.3 pypi_0
prompt-toolkit 3.0.48 pypi_0
protobuf 4.24.4 pypi_0
psutil 6.1.0 pypi_0
ptyprocess 0.7.0 pypi_0
pydantic 1.8.2 pypi_0
pygments 2.17.2 pypi_0
python 3.7.12 hf930737_100_cpython
python-dateutil 2.9.0.post0 pypi_0
pyyaml 6.0.1 pypi_0
readline 8.2 h5eee18b_0
regex 2024.4.16 pypi_0
requests 2.31.0 pypi_0
safetensors 0.4.5 pypi_0
scipy 1.7.3 pypi_0
sentry-sdk 2.18.0 pypi_0
setproctitle 1.3.3 pypi_0
setuptools 65.6.3 py37h06a4308_0
shortuuid 1.0.13 pypi_0
six 1.16.0 pypi_0
smart-open 6.4.0 pypi_0
smmap 5.0.1 pypi_0
spacy 3.3.0 pypi_0
spacy-legacy 3.0.12 pypi_0
spacy-loggers 1.0.5 pypi_0
sqlite 3.45.2 h2c6b66d_0
srsly 2.4.8 pypi_0
subprocess32 3.5.4 pypi_0
sysroot_linux-64 2.17 h57e8cba_10
tabulate 0.9.0 pypi_0
tensorboardx 2.6.2.2 pypi_0
termcolor 2.3.0 pypi_0
thinc 8.0.17 pypi_0
tk 8.6.13 noxft_h4845f30_101
tokenizers 0.13.3 pypi_0
tomli 2.0.1 pypi_0
torch 1.12.0+cu113 pypi_0
torchaudio 0.12.0+cu113 pypi_0
torchvision 0.13.0+cu113 pypi_0
tqdm 4.67.0 pypi_0
traitlets 5.9.0 pypi_0
transformers 4.30.2 pypi_0
typer 0.4.2 pypi_0
typing-extensions 3.10.0.2 pypi_0
urllib3 2.0.7 pypi_0
wandb 0.12.0 pypi_0
wasabi 0.10.1 pypi_0
wcwidth 0.2.13 pypi_0
wheel 0.38.4 py37h06a4308_0
xz 5.4.6 h5eee18b_1
zipp 3.15.0 pypi_0
zlib 1.3.1 hb9d3cd8_2

qzp2018 commented 2 weeks ago

Sorry to bother you, but I am facing the same issue now. I downloaded the code this monday, which should has been the latest code. Any help would be appreciated.

Hi, did you use the same pytorch and python version with mine in the readme? I find the error python version is 3.8, and my python version is 3.7.

I'm using python 3.7 now and the error is still there. Packages in my env are as follows:

Name Version Build

_libgcc_mutex 0.1 conda_forge _openmp_mutex 4.5 2_gnu _sysroot_linux-64_curr_repodata_hack 3 haa98f57_10 backcall 0.2.0 pypi_0 binutils_impl_linux-64 2.36.1 h193b22a_2 binutils_linux-64 2.36 hf3e587d_10 blis 0.7.11 pypi_0 ca-certificates 2024.9.24 h06a4308_0 catalogue 2.0.10 pypi_0 certifi 2022.12.7 py37h06a4308_0 charset-normalizer 3.4.0 pypi_0 click 8.1.7 pypi_0 configparser 5.3.0 pypi_0 cudatoolkit 11.3.1 h2bc3f7f_2 cudnn 8.9.2.26 cuda11_0 cymem 2.0.8 pypi_0 decorator 5.1.1 pypi_0 docker-pycreds 0.4.0 pypi_0 einops 0.6.1 pypi_0 en-core-web-sm 3.3.0 pypi_0 filelock 3.12.2 pypi_0 fsspec 2023.1.0 pypi_0 gcc_impl_linux-64 10.4.0 h7ee1905_17 gcc_linux-64 10.4.0 h9215b83_10 gitdb 4.0.11 pypi_0 gitpython 3.1.43 pypi_0 gxx_impl_linux-64 10.4.0 h7ee1905_17 gxx_linux-64 10.4.0 h6e491c6_10 h5py 3.8.0 pypi_0 huggingface-hub 0.16.4 pypi_0 idna 3.10 pypi_0 importlib-metadata 6.7.0 pypi_0 ipdb 0.13.13 pypi_0 ipython 7.34.0 pypi_0 jedi 0.19.1 pypi_0 jinja2 3.1.4 pypi_0 kernel-headers_linux-64 3.10.0 h57e8cba_10 langcodes 3.3.0 pypi_0 ld_impl_linux-64 2.36.1 hea4e1c9_2 libffi 3.4.4 h6a678d5_1 libgcc 14.2.0 h77fa898_1 libgcc-devel_linux-64 10.4.0 h74af60c_17 libgcc-ng 14.2.0 h69a702a_1 libgomp 14.2.0 h77fa898_1 libnsl 2.0.0 h5eee18b_0 libprotobuf 3.20.3 h3eb15da_0 libsanitizer 10.4.0 hde28e3b_17 libsqlite 3.45.2 h2797004_0 libstdcxx 14.2.0 hc0a3c3a_1 libstdcxx-devel_linux-64 10.4.0 h74af60c_17 libstdcxx-ng 14.2.0 h4852527_1 libzlib 1.3.1 hb9d3cd8_2 llvmlite 0.39.1 pypi_0 markupsafe 2.1.5 pypi_0 matplotlib-inline 0.1.6 pypi_0 murmurhash 1.0.10 pypi_0 ncurses 6.4 h6a678d5_0 numba 0.56.4 pypi_0 numpy 1.21.6 pypi_0 openssl 3.0.15 h5eee18b_0 packaging 24.0 pypi_0 parso 0.8.4 pypi_0 pathtools 0.1.2 pypi_0 pathy 0.10.3 pypi_0 pexpect 4.9.0 pypi_0 pickleshare 0.7.5 pypi_0 pillow 9.5.0 pypi_0 pip 22.3.1 py37h06a4308_0 plyfile 0.9 pypi_0 preshed 3.0.9 pypi_0 promise 2.3 pypi_0 prompt-toolkit 3.0.48 pypi_0 protobuf 4.24.4 pypi_0 psutil 6.1.0 pypi_0 ptyprocess 0.7.0 pypi_0 pydantic 1.8.2 pypi_0 pygments 2.17.2 pypi_0 python 3.7.12 hf930737_100_cpython python-dateutil 2.9.0.post0 pypi_0 pyyaml 6.0.1 pypi_0 readline 8.2 h5eee18b_0 regex 2024.4.16 pypi_0 requests 2.31.0 pypi_0 safetensors 0.4.5 pypi_0 scipy 1.7.3 pypi_0 sentry-sdk 2.18.0 pypi_0 setproctitle 1.3.3 pypi_0 setuptools 65.6.3 py37h06a4308_0 shortuuid 1.0.13 pypi_0 six 1.16.0 pypi_0 smart-open 6.4.0 pypi_0 smmap 5.0.1 pypi_0 spacy 3.3.0 pypi_0 spacy-legacy 3.0.12 pypi_0 spacy-loggers 1.0.5 pypi_0 sqlite 3.45.2 h2c6b66d_0 srsly 2.4.8 pypi_0 subprocess32 3.5.4 pypi_0 sysroot_linux-64 2.17 h57e8cba_10 tabulate 0.9.0 pypi_0 tensorboardx 2.6.2.2 pypi_0 termcolor 2.3.0 pypi_0 thinc 8.0.17 pypi_0 tk 8.6.13 noxft_h4845f30_101 tokenizers 0.13.3 pypi_0 tomli 2.0.1 pypi_0 torch 1.12.0+cu113 pypi_0 torchaudio 0.12.0+cu113 pypi_0 torchvision 0.13.0+cu113 pypi_0 tqdm 4.67.0 pypi_0 traitlets 5.9.0 pypi_0 transformers 4.30.2 pypi_0 typer 0.4.2 pypi_0 typing-extensions 3.10.0.2 pypi_0 urllib3 2.0.7 pypi_0 wandb 0.12.0 pypi_0 wasabi 0.10.1 pypi_0 wcwidth 0.2.13 pypi_0 wheel 0.38.4 py37h06a4308_0 xz 5.4.6 h5eee18b_1 zipp 3.15.0 pypi_0 zlib 1.3.1 hb9d3cd8_2

Did you follow the installation of my version? Can you create a new environment and try again? If error still exits, please paste the error.

Origin-ZXY commented 2 weeks ago

您好,这个pointnet模型的网址进不去,有其他地点吗? [6] gf_detector_l6o256.pth: Download PointNet++ [checkpoint] into [DATA_ROOT]

qzp2018 commented 2 weeks ago

您好,这个pointnet模型的网址进不去,有其他地点吗? [6] gf_detector_l6o256.pth: Download PointNet++ [checkpoint] into [DATA_ROOT]

你好,我刚刚试了一下,网址是有效的,你多刷新几次试试?如果不行的话,可以挂载个vpn再试一下,理论上有无vpn都可以下载的

Origin-ZXY commented 2 weeks ago

您好,这个pointnet模型的网址进不去,有其他地点吗? [6] gf_detector_l6o256.pth: Download PointNet++ [checkpoint] into [DATA_ROOT]

你好,我刚刚试了一下,网址是有效的,你多刷新几次试试?如果不行的话,可以挂载个vpn再试一下,理论上有无vpn都可以下载的

非常感谢,是我的VPN出了问题