MCG-NJU / MeMOTR

[ICCV 2023] MeMOTR: Long-Term Memory-Augmented Transformer for Multi-Object Tracking
https://arxiv.org/abs/2307.15700
MIT License
140 stars 8 forks source link

An error occurred while replicating the code #4

Closed BelieveF closed 9 months ago

BelieveF commented 10 months ago

Thank you for your excellent work. When I was training on the dancetrack dataset, I got an error: RuntimeError: mat1 and mat2 shapes cannot be multiplied (300x256 and 512x256). This error seems to say that the two matrices have different shapes, but I can't find the problematic block of code. Could you give me some guidance, please? Thank you very much.

HELLORPG commented 10 months ago

Which config file are you using?

BelieveF commented 10 months ago

Which config file are you using?

Hello, I use this for training: MeMOTR-main/configs/train_dancetrack.yaml

HELLORPG commented 10 months ago

Can you give me more context about this error, perhaps a screenshot? There should be other text before this RuntimeError.

BelieveF commented 10 months ago

Thank you for your reply. Error reported as follows: 1700291947640

HELLORPG commented 10 months ago

I ran the same exp on my server, but this issue did not occur.

I notice that the error is caused by raw_query_pos = self.ref_point_head(anchor_embed) at line 99 in the file deformable_decoder.py. However, the same code is in line 93, have you change some code in before it? Furthermore, can you check the shape of the tensor anchor_embed? This tensor should be 300x512 in our process, but it seems 300x256 in your code. I wonder to know that if you have modified the code related to it.

BelieveF commented 10 months ago

I ran the same exp on my server, but this issue did not occur.

I notice that the error is caused by raw_query_pos = self.ref_point_head(anchor_embed) at line 99 in the file deformable_decoder.py. However, the same code is in line 93, have you change some code in before it? Furthermore, can you check the shape of the tensor anchor_embed? This tensor should be 300x512 in our process, but it seems 300x256 in your code. I wonder to know that if you have modified the code related to it.

Your reply is very helpful to me. I will review the code and look at the tensor shape. I will let you know if I have solved your problem under this question, thanks again

HELLORPG commented 9 months ago

You're welcome. Looking forward to your good news.

BelieveF commented 9 months ago

You're welcome. Looking forward to your good news.

Hello, with your help, I successfully solved my problem: the reason is that I modified the tensor information when debugging the code, which caused the problem. You can close the problem channel. Thank you very much for your help.

HELLORPG commented 9 months ago

I'm happy to help. Have a nice day~:tada: