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

ValueError: need at least one array to concatenate #299

Closed
3155827819 opened this issue May 14, 2022 · 5 comments
Closed

ValueError: need at least one array to concatenate #299

3155827819 opened this issue May 14, 2022 · 5 comments

Comments

@3155827819
Copy link

Traceback (most recent call last):
File "/home/zhx/azb/mmrotate-main/tools/train.py", line 192, in
main()
File "/home/zhx/azb/mmrotate-main/tools/train.py", line 181, in main
train_detector(
File "/home/zhx/azb/mmrotate-main/mmrotate/apis/train.py", line 141, in train_detector
runner.run(data_loaders, cfg.workflow)
File "/home/zhx/anaconda3/envs/bebox/lib/python3.8/site-packages/mmcv/runner/epoch_based_runner.py", line 127, in run
epoch_runner(data_loaders[i], **kwargs)
File "/home/zhx/anaconda3/envs/bebox/lib/python3.8/site-packages/mmcv/runner/epoch_based_runner.py", line 47, in train
for i, data_batch in enumerate(self.data_loader):
File "/home/zhx/anaconda3/envs/bebox/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 359, in iter
return self._get_iterator()
File "/home/zhx/anaconda3/envs/bebox/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 305, in _get_iterator
return _MultiProcessingDataLoaderIter(self)
File "/home/zhx/anaconda3/envs/bebox/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 944, in init
self._reset(loader, first_iter=True)
File "/home/zhx/anaconda3/envs/bebox/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 975, in _reset
self._try_put_index()
File "/home/zhx/anaconda3/envs/bebox/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1209, in _try_put_index
index = self._next_index()
File "/home/zhx/anaconda3/envs/bebox/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 512, in _next_index
return next(self._sampler_iter) # may raise StopIteration
File "/home/zhx/anaconda3/envs/bebox/lib/python3.8/site-packages/torch/utils/data/sampler.py", line 229, in iter
for idx in self.sampler:
File "/home/zhx/anaconda3/envs/bebox/lib/python3.8/site-packages/mmdet/datasets/samplers/group_sampler.py", line 36, in iter
indices = np.concatenate(indices)
File "<array_function internals>", line 180, in concatenate
ValueError: need at least one array to concatenate

@Josh00-Lu
Copy link

Josh00-Lu commented May 14, 2022

Same Problem.

@yangxue0827
Copy link
Collaborator

Check your data path.
refer to
#35

@yangxue0827
Copy link
Collaborator

A related blog: https://icode.best/i/79733546247546

@zytx121 zytx121 closed this as completed May 16, 2022
@LFayL
Copy link

LFayL commented Jul 9, 2022

Same Problem.

@zhangchi621
Copy link

大概率是路径问题,仔细确认,我的主路径没问题,训练和测试的子路径出问题了

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

6 participants