RuntimeError: Sizes of tensors must match except in dimension 0
akashbahai opened this issue · 4 comments
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?
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.
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.
I haven't been getting this error anymore actually. I think I added --pair since I had multiple chains in the fasta file.
Glad to hear that!