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

Train error: too many indices for tensor of dimension 2 #17

Open
azir12345 opened this issue Nov 4, 2024 · 1 comment
Open

Train error: too many indices for tensor of dimension 2 #17

azir12345 opened this issue Nov 4, 2024 · 1 comment

Comments

@azir12345
Copy link

When I use the dips database for training, the run.py script reports an error: IndexError: too many indices for tensor of dimension 2.The position of the pt file obtained by gen_dips_datasets.py has only two dimensions: sequence position and three-dimensional coordinates. There’s no dimension of atomic type. Could you please provide guidance on how to handle this issue?

Original Traceback (most recent call last):
  File "/root/miniconda3/envs/geo/lib/python3.9/site-packages/torch/utils/data/_utils/worker.py", line 308, in _worker_loop
    data = fetcher.fetch(index)
  File "/root/miniconda3/envs/geo/lib/python3.9/site-packages/torch/utils/data/_utils/fetch.py", line 51, in fetch
    data = [self.dataset[idx] for idx in possibly_batched_index]
  File "/root/miniconda3/envs/geo/lib/python3.9/site-packages/torch/utils/data/_utils/fetch.py", line 51, in <listcomp>
    data = [self.dataset[idx] for idx in possibly_batched_index]
  File "/root/GeoDock-main/geodock/datasets/geodock_dataset.py", line 257, in __getitem__
    label_rotat = self.get_rotat(label_coords)
  File "/root/GeoDock-main/geodock/datasets/geodock_dataset.py", line 322, in get_rotat
    n_coords = coords[:, 0, :]
@kdinashi
Copy link

Hi, I am facing exactly the same issue. Did you find any solution?

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