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

torch shape error #1

Open
fire537 opened this issue Oct 23, 2024 · 2 comments
Open

torch shape error #1

fire537 opened this issue Oct 23, 2024 · 2 comments

Comments

@fire537
Copy link

fire537 commented Oct 23, 2024

Hello, after setting up the environment locally, I tested using the fasta files in the Data directory without any issues. However, when I run it with my own fasta files, I encounter some errors:
Traceback (most recent call last):
File "./Active_sites/main.py", line 14, in
predict(model_class, args)
File "/tools/GraphEC/Active_sites/utils.py", line 84, in predict
outputs = [model(data.X, data.node_feat, data.edge_index, data.seq, data.batch).sigmoid() for model in models]
File "/tools/GraphEC/Active_sites/utils.py", line 84, in
outputs = [model(data.X, data.node_feat, data.edge_index, data.seq, data.batch).sigmoid() for model in models]
File "/conda_envs/esmfold/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1194, in _call_impl
return forward_call(*input, **kwargs)
File "/tools/GraphEC/Active_sites/model.py", line 151, in forward
h_V = torch.cat([h_V, h_V_geo], dim=-1)
RuntimeError: Sizes of tensors must match except in dimension 1. Expected size 1 but got size 213 for tensor number 1 in the list.

@YidongSong
Copy link
Collaborator

This error occurred when utilizing the torch.cat function. please verify the data dimensions.

@morant12
Copy link

我也在处理NEW392第355个id时出现了相同的问题,我通过补充了一个维度全为1再进行拼接。我在使用预测NEW392过程中遇到了line 279, in _get_direction_orientation
t = F.normalize(X[:, [0, 2, 3, 4]] - X_Ca.unsqueeze(1), dim=-1)
RuntimeError: CUDA error: device-side assert triggered
CUDA kernel errors might be asynchronously reported at some other API call,so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1.

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

3 participants