Skip to content

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

@azir12345

Description

@azir12345

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, :]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions