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

Cannot reshape a tensor with 2705220 elements to shape [6441,127,1] #7

Closed
chenxin199261 opened this issue Jul 25, 2021 · 4 comments
Closed

Comments

@chenxin199261
Copy link

chenxin199261 commented Jul 25, 2021

Hello,I am using this ipynb file on Colab
https://colab.research.google.com/github/sokrypton/ColabFold/blob/main/AlphaFold2.ipynb

When I did the Gather input features, predict structure step. I found an error.

=============================================
Running model_1
InvalidArgumentError Traceback (most recent call last)
/usr/local/lib/python3.7/dist-packages/tensorflow/python/framework/ops.py in _create_c_op(graph, node_def, inputs, control_inputs, op_def)
1879 try:
-> 1880 c_op = pywrap_tf_session.TF_FinishOperation(op_desc)
1881 except errors.InvalidArgumentError as e:

InvalidArgumentError: Cannot reshape a tensor with 2705220 elements to shape [6441,127,1] (818007 elements) for '{{node reshape_msa}} = Reshape[T=DT_INT32, Tshape=DT_INT32](Const_6, reshape_msa/shape)' with input shapes: [6441,420], [3] and with input tensors computed as partial shapes: input[1] = [6441,127,1].

During handling of the above exception, another exception occurred:

ValueError Traceback (most recent call last)
12 frames
/usr/local/lib/python3.7/dist-packages/tensorflow/python/framework/ops.py in _create_c_op(graph, node_def, inputs, control_inputs, op_def)
1881 except errors.InvalidArgumentError as e:
1882 # Convert to ValueError for backwards compatibility.
-> 1883 raise ValueError(str(e))
1884
1885 return c_op
ValueError: Cannot reshape a tensor with 2705220 elements to shape [6441,127,1] (818007 elements) for '{{node reshape_msa}} = Reshape[T=DT_INT32, Tshape=DT_INT32](Const_6, reshape_msa/shape)' with input shapes: [6441,420], [3] and with input tensors computed as partial shapes: input[1] = [6441,127,1].

============================================================

My protein sequence is:

SMNPPPPETSNPNKPKRQTNQLQYLLRVVLKTLWKHQFAWPFQQPVDAVKLNLPDYYKIIKTPMDMGTIKKRLENNYYWNAQECIQDFNTMFTNCYIYNKPGDDIVLMAEALEKLFLQKINELPTEE

@sokrypton
Copy link
Owner

Hmmm... it worked for me. Were there any other options you enabled/disabled (compared to default)? Can you try "factory reset" and run all again?

@chenxin199261
Copy link
Author

Hmmm... it worked for me. Were there any other options you enabled/disabled (compared to default)? Can you try "factory reset" and run all again?

It worked after I restart the environment ! The second running failed.

@sokrypton
Copy link
Owner

For the "second running" are you changing the sequence?

@sokrypton
Copy link
Owner

Fixed it! You should be able to run again with second sequence without needing to factory reset.

Thanks for the report!

martin-steinegger pushed a commit that referenced this issue Nov 10, 2021
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