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 #103

Open
prayagpawar opened this issue Nov 21, 2022 · 2 comments
Open

ValueError: need at least one array to concatenate #103

prayagpawar opened this issue Nov 21, 2022 · 2 comments

Comments

@prayagpawar
Copy link

loading annotations into memory...
Done (t=0.00s)
creating index...
index created!
2022-11-21 16:08:57,399 - INFO - Start running, host: pdrl@pdrl, work_dir: /home/pdrl/aerialdetection/AerialDetection/work_dirs/faster_rcnn_RoITrans_r50_fpn_1x_dota
2022-11-21 16:08:57,399 - INFO - workflow: [('train', 1)], max: 12 epochs
Traceback (most recent call last):
File "tools/train.py", line 95, in
main()
File "tools/train.py", line 91, in main
logger=logger)
File "/home/pdrl/aerialdetection/AerialDetection/mmdet/apis/train.py", line 61, in train_detector
_non_dist_train(model, dataset, cfg, validate=validate)
File "/home/pdrl/aerialdetection/AerialDetection/mmdet/apis/train.py", line 197, in _non_dist_train
runner.run(data_loaders, cfg.workflow, cfg.total_epochs)
File "/home/pdrl/anaconda3/envs/AerialDetection/lib/python3.7/site-packages/mmcv/runner/runner.py", line 359, in run
epoch_runner(data_loaders[i], **kwargs)
File "/home/pdrl/anaconda3/envs/AerialDetection/lib/python3.7/site-packages/mmcv/runner/runner.py", line 259, in train
for i, data_batch in enumerate(data_loader):
File "/home/pdrl/anaconda3/envs/AerialDetection/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 278, in iter
return _MultiProcessingDataLoaderIter(self)
File "/home/pdrl/anaconda3/envs/AerialDetection/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 709, in init
self._try_put_index()
File "/home/pdrl/anaconda3/envs/AerialDetection/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 826, in _try_put_index
index = self._next_index()
File "/home/pdrl/anaconda3/envs/AerialDetection/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 318, in _next_index
return next(self.sampler_iter) # may raise StopIteration
File "/home/pdrl/anaconda3/envs/AerialDetection/lib/python3.7/site-packages/torch/utils/data/sampler.py", line 200, in iter
for idx in self.sampler:
File "/home/pdrl/aerialdetection/AerialDetection/mmdet/datasets/loader/sampler.py", line 63, in iter
indices = np.concatenate(indices)
File "<array_function internals>", line 6, in concatenate
ValueError: need at least one array to concatenate
when i run train.py i get this

@622tongtong
Copy link

I am experiencing the same problem, how did you resolve this issue?

@dingjiansw101
Copy link
Owner

I did not meet this error before. Did you install the code with the correct lib version?

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

3 participants