Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RuntimeError: Sizes of tensors must match except in dimension 0 #13

Open
akashbahai opened this issue Jul 5, 2023 · 4 comments
Open

Comments

@akashbahai
Copy link

Hi,
When I am trying to run the example, I am getting the following error:
Traceback (most recent call last):
File "/home/project/12003580/RoseTTAFold2/network/predict.py", line 493, in
pred.predict(
File "/home/project/12003580/RoseTTAFold2/network/predict.py", line 218, in predict
msa_orig = merge_a3m_hetero(msa_orig, {'msa':msas[i],'ins':inss[i]}, [sum(Ls_blocked[:i]),Ls_blocked[i]])
File "/data/projects/12003580/RoseTTAFold2/network/data_loader.py", line 531, in merge_a3m_hetero
msa = torch.cat(msa, dim=0)
RuntimeError: Sizes of tensors must match except in dimension 0. Expected size 275 but got size 2176 for tensor number 1 in the list.

What could be the reason for this?

@lloydtripp
Copy link

Hi,

I just ran into this issue as well. I got the example structures working just fine but ran into an issue when I tried modeling a tetramer structure.

Error code:

Traceback (most recent call last):
  File "/storage1/fs1/ghaller/Active/lloydt/LT2_Protein-Modeling/RosettaFold2/network/predict.py", line 493, in <module>
    pred.predict(
  File "/storage1/fs1/ghaller/Active/lloydt/LT2_Protein-Modeling/RosettaFold2/network/predict.py", line 218, in predict
    msa_orig = merge_a3m_hetero(msa_orig, {'msa':msas[i],'ins':inss[i]}, [sum(Ls_blocked[:i]),Ls_blocked[i]])
  File "/storage1/fs1/ghaller/Active/lloydt/LT2_Protein-Modeling/RosettaFold2/network/data_loader.py", line 531, in merge_a3m_hetero
    msa = torch.cat(msa, dim=0)
RuntimeError: Sizes of tensors must match except in dimension 0. Expected size 705 but got size 1467 for tensor number 1 in the list.

@akashbahai
Copy link
Author

Hi @lloydtripp,
Sorry, but I don't recall how I got rid of this error! It was probably something to do with the MSA file, but I don't recall exactly. I can try my installation on your sequence and check if it works.

@lloydtripp
Copy link

I haven't been getting this error anymore actually. I think I added --pair since I had multiple chains in the fasta file.

@akashbahai
Copy link
Author

Glad to hear that!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants