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

AssertionError: Adding a field of length 0 to a Instances of length 2 #22

Open
longlizhi opened this issue Aug 6, 2022 · 2 comments
Open

Comments

@longlizhi
Copy link

Hi, I am getting the following error when running this coarse partition network with train2017 dataset

ERROR [08/05 15:18:06 d2.engine.train_loop]: Exception during training:
Traceback (most recent call last):
File "/home/hndx/detectron2-main/detectron2/engine/train_loop.py", line 149, in train
self.run_step()
File "/home/hndx/detectron2-main/detectron2/engine/defaults.py", line 494, in run_step
self._trainer.run_step()
File "/home/hndx/detectron2-main/detectron2/engine/train_loop.py", line 268, in run_step
data = next(self._data_loader_iter)
File "/home/hndx/detectron2-main/detectron2/data/common.py", line 234, in iter
for d in self.dataset:
File "/home/hndx/anaconda3/envs/llz0/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 521, in next
data = self._next_data()
File "/home/hndx/anaconda3/envs/llz0/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 1203, in _next_data
return self._process_data(data)
File "/home/hndx/anaconda3/envs/llz0/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 1229, in _process_data
data.reraise()
File "/home/hndx/anaconda3/envs/llz0/lib/python3.7/site-packages/torch/_utils.py", line 434, in reraise
raise exception
AssertionError: Caught AssertionError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "/home/hndx/anaconda3/envs/llz0/lib/python3.7/site-packages/torch/utils/data/_utils/worker.py", line 287, in _worker_loop
data = fetcher.fetch(index)
File "/home/hndx/anaconda3/envs/llz0/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 32, in fetch
data.append(next(self.dataset_iter))
File "/home/hndx/detectron2-main/detectron2/data/common.py", line 201, in iter
yield self.dataset[idx]
File "/home/hndx/detectron2-main/detectron2/data/common.py", line 90, in getitem
data = self._map_func(self._dataset[cur_idx])
File "/home/hndx/detectron2-main/detectron2/utils/serialize.py", line 26, in call
return self._obj(*args, **kwargs)
File "/home/hndx/detectron2-main/detectron2/projects/EntitySeg/entityseg/data/dataset_mapper.py", line 197, in call
instances.instanceid = instance_id_list
File "/home/hndx/detectron2-main/detectron2/structures/instances.py", line 66, in setattr
self.set(name, val)
File "/home/hndx/detectron2-main/detectron2/structures/instances.py", line 84, in set
), "Adding a field of length {} to a Instances of length {}".format(data_len, len(self)) ##lizhi long

@qqlu
Copy link
Owner

qqlu commented Aug 11, 2022

I am a little confused by the problem. I think it is better to communicate by wechat. Could you send your WeChat to my email (qqlu1992@gmail.com)

@longlizhi
Copy link
Author

longlizhi commented Aug 11, 2022 via email

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