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

IndexError: tensors used as indices must be long, byte or bool tensors #9

Open
bioermaf opened this issue Dec 20, 2022 · 0 comments
Open

Comments

@bioermaf
Copy link

when I run the programe , I got this error :

python run_inference.py --model science --model_dir models --seqs tests/data/inference_science_input.csv --ncpu 1 --out_dir out_tests
0%| | 0/1 [00:02<?, ?it/s]
multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\envs\dev\lib\multiprocessing\pool.py", line 125, in worker
result = (True, func(*args, **kwds))
File "D:\workspaces\equifold\run_inference.py", line 36, in process_one
cg_X0=cg_X0[cg_cgidx].type(dtype),
IndexError: tensors used as indices must be long, byte or bool tensors
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "run_inference.py", line 81, in
dataset = list(tqdm(p.imap_unordered(process_one, jobs), total=len(jobs)))
File "C:\ProgramData\Anaconda3\envs\dev\lib\site-packages\tqdm\std.py", line 1195, in iter
for obj in iterable:
File "C:\ProgramData\Anaconda3\envs\dev\lib\multiprocessing\pool.py", line 868, in next
raise value
IndexError: tensors used as indices must be long, byte or bool tensors

How to resolve it.

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

1 participant