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

Hi, I am getting list index out of range error during training #264

Open
Noirombre opened this issue Oct 10, 2023 · 2 comments
Open

Hi, I am getting list index out of range error during training #264

Noirombre opened this issue Oct 10, 2023 · 2 comments

Comments

@Noirombre
Copy link

Hi,
I am getting list index out of range error during training
微信图片_20231010174430

@Noirombre
Copy link
Author

----------------EPOCH 1
Processing: | | 0/49[00:00<?,?it/s]Batch = nan|EMA = nanTraceback (most recent call last):
File "run_train.py", line 305, in
trainer.run()
File "run_train.py", line 288, in run
self.run_once(
File "run_train.py", line 265, in run_once
main_runner.run(opt["nr_epochs"])
File "E:\hover\hover_net-master\run_utils\engine.py", line 172, in run
for data_batch in self.dataloader:
File "E:\Anaconda\lib\site-packages\torch\utils\data\dataloader.py", line 633, in next
data = self._next_data()
File "E:\Anaconda\lib\site-packages\torch\utils\data\dataloader.py", line 1345, in _next_data
return self._process_data(data)
File "E:\Anaconda\lib\site-packages\torch\utils\data\dataloader.py", line 1371, in _process_data
data.reraise()
File "E:\Anaconda\lib\site-packages\torch_utils.py", line 644, in reraise
raise exception
IndexError: Caught IndexError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "E:\Anaconda\lib\site-packages\torch\utils\data_utils\worker.py", line 308, in _worker_loop
data = fetcher.fetch(index)
File "E:\Anaconda\lib\site-packages\torch\utils\data_utils\fetch.py", line 51, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "E:\Anaconda\lib\site-packages\torch\utils\data_utils\fetch.py", line 51, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "E:\hover\hover_net-master\dataloader\train_loader.py", line 98, in getitem
type_map = (ann[..., 1]).copy()
IndexError: index 1 is out of bounds for axis 2 with size 1

@simongraham
Copy link
Collaborator

Looks like your data has not been prepared right. It is trying to grab the second channel for the type map, which apparently isn't there.

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