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

ModuleAttributeError #2

Closed mellody11 closed 4 months ago

mellody11 commented 4 months ago

Hi, thank you for sharing your great work.

In the file mcln.py, line 431, I have encountered an error that 'MCLN' object has no attribute 'rel_encoder'. It seems that the network lacks the module rel_encoder.

Looking forward to your replay. Thank you.

qzp2018 commented 4 months ago

Thank you for your carefulness, I update the file, and you can try again.

mellody11 commented 4 months ago

Thank you, the problem is solved, Howere, another problem occurs.

In file mcln.py, line 78, The error is ValueError: not enough values to unpack (expected 3, got 2). It seems that the return of MultiheadAttention is 2, but there are 3 values in the code.

Looking forward to your replay. Thank you.

qzp2018 commented 4 months ago

Sorry that we rewrite the MultiheadAttention in the torch.nn, I upload the mcln_attention.py and import MultiheadAttention via relative paths, you can try whether it works.

mellody11 commented 4 months ago

Hi, thank you for your attention, is the repository still being updated? There are still some problems in the latest version.

mellody11 commented 4 months ago

Currently the problem I encountered is ImportError: cannot import name 'NonDynamicallyQuantizableLinear' from 'torch.nn.modules.linear' (/data/liuxuexun/miniconda3/envs/mcln/lib/python3.7/site-packages/torch/nn/modules/linear.py)

qzp2018 commented 4 months ago

Hi, I tried in my version, it works. You can check in your file(/data/liuxuexun/miniconda3/envs/mcln/lib/python3.7/site-packages/torch/nn/modules/linear.py) whether there exists NonDynamicallyQuantizableLinear.

mellody11 commented 4 months ago

Thank you, can you provide your Pytorch version? I use the version mentioned in the readme.md (Pytorch 1.9.0) and still encounter the error AttributeError: 'Tensor' object has no attribute 'is_nested'. This error may cause by the version of Pytorch.

Looking forward to your replay. Thank you.

qzp2018 commented 4 months ago

Sorry that the version is'1.12.0+cu113', I update the READEME and related files. Please use the latest code and environment, I reconfigured the environment and ran all the code, there should be no other problems. :ambulance: :ambulance: :ambulance:

mellody11 commented 4 months ago

Thank you, the code is successfully running now.