-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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
TypeError: expected sequence object with len >= 0 or a single integer #2842
Comments
I meet same error |
There is no |
I see the explanation. That means we can't train for several rounds and then Val?
…------------------ 原始邮件 ------------------
发件人: "Kai Chen"<notifications@github.com>;
发送时间: 2020年5月29日(星期五) 中午1:12
收件人: "open-mmlab/mmdetection"<mmdetection@noreply.github.com>;
抄送: "利剑"<1632401541@qq.com>;"Author"<author@noreply.github.com>;
主题: Re: [open-mmlab/mmdetection] TypeError: expected sequence object with len >= 0 or a single integer (#2842)
There is no --validate argument, only --no-validate.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Validation is enabled by default. If you want to skip the validation, you can add the |
I downloaded the latest. If validation is enabled by default, why is there no map of Val data in my training process? Is there something wrong with my setup? Please advise. Thank you
…------------------ 原始邮件 ------------------
发件人: "Kai Chen"<notifications@github.com>;
发送时间: 2020年5月29日(星期五) 中午1:18
收件人: "open-mmlab/mmdetection"<mmdetection@noreply.github.com>;
抄送: "利剑"<1632401541@qq.com>;"Author"<author@noreply.github.com>;
主题: Re: [open-mmlab/mmdetection] TypeError: expected sequence object with len >= 0 or a single integer (#2842)
Validation is enabled by default. If you want to skip the validation, you can add the --no-validate argument. I am afraid the version you were using is too old.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
python tools/train.py --config example/dior/faster_rcnn_r101_fpn_1x.py optimizeroptimizer = dict(type='SGD', lr=0.02, momentum=0.9, weight_decay=0.0001) learning policylr_config = dict( Operation is just training, and there is no Val data calculation map? Please advise |
Hi, I also face the "TypeError: expected sequence object with len >= 0 or a single integer" when one epoch is finished. |
Hi, the problem of "TypeError: expected sequence object with len >= 0 or a single integer" seems not relevant with the argument setting. |
add the code
below mmdetection/mmdet/apis/test.py Line 25 in 0d67223
|
1 similar comment
add the code
below mmdetection/mmdet/apis/test.py Line 25 in 0d67223
|
Hi, do you know why this error occured? |
just debug |
Hi folks When I run the file it is correctly working, however, when I debug the code, it do not work. Following Errors are showing:
I could not understand, why it happens and how can I solve it out? Please help me to sort out this problem |
That's not a good solution. You only train with |
Is there still a problem with the latest version now? |
* fix save_inference_model cannot find feed vars * remove comment * fix format * add comment for pruned var * add log for prune
I have this issue when my config |
Is this problem solved? Someone please let me know. |
I had the same problem, and it was solved by setting gpu_ids = [0] in the config file (obviously when you use 1 single GPU to test). |
i run python tools/train.py --config example/dior/faster_rcnn_r101_fpn_1x.py --validate
I see the explanation, but I don't suggest that I think it can be used, so I added a test during the training. Would you like to ask the reason for the error??
_rpn_bbox: 0.0190, loss_cls: 0.1400, acc: 95.4509, loss_bbox: 0.0957, loss: 0.2879
[ ] 0/11738, elapsed: 0s, ETA:Traceback (most recent call last):
File "tools/train.py", line 154, in
main()
File "tools/train.py", line 150, in main
meta=meta)
File "/data/maq/PycharmProjects/TSD-master/mmdet/apis/train.py", line 169, in train_detector
runner.run(data_loaders, cfg.workflow, cfg.total_epochs)
File "/data/maq/anaconda3/envs/mmdetect/lib/python3.7/site-packages/mmcv/runner/runner.py", line 380, in run
epoch_runner(data_loaders[i], **kwargs)
File "/data/maq/anaconda3/envs/mmdetect/lib/python3.7/site-packages/mmcv/runner/runner.py", line 288, in train
self.call_hook('after_train_epoch')
File "/data/maq/anaconda3/envs/mmdetect/lib/python3.7/site-packages/mmcv/runner/runner.py", line 241, in call_hook
getattr(hook, fn_name)(self)
File "/data/maq/PycharmProjects/TSD-master/mmdet/core/evaluation/eval_hooks.py", line 28, in after_train_epoch
results = single_gpu_test(runner.model, self.dataloader, show=False)
File "/data/maq/PycharmProjects/TSD-master/mmdet/apis/test.py", line 19, in single_gpu_test
result = model(return_loss=False, rescale=not show, **data)
File "/data/maq/anaconda3/envs/mmdetect/lib/python3.7/site-packages/torch/nn/modules/module.py", line 547, in call
result = self.forward(*input, **kwargs)
File "/data/maq/anaconda3/envs/mmdetect/lib/python3.7/site-packages/torch/nn/parallel/data_parallel.py", line 153, in forward
return self.gather(outputs, self.output_device)
File "/data/maq/anaconda3/envs/mmdetect/lib/python3.7/site-packages/torch/nn/parallel/data_parallel.py", line 165, in gather
return gather(outputs, output_device, dim=self.dim)
File "/data/maq/anaconda3/envs/mmdetect/lib/python3.7/site-packages/torch/nn/parallel/scatter_gather.py", line 68, in gather
res = gather_map(outputs)
File "/data/maq/anaconda3/envs/mmdetect/lib/python3.7/site-packages/torch/nn/parallel/scatter_gather.py", line 63, in gather_map
return type(out)(map(gather_map, zip(*outputs)))
File "/data/maq/anaconda3/envs/mmdetect/lib/python3.7/site-packages/torch/nn/parallel/scatter_gather.py", line 63, in gather_map
return type(out)(map(gather_map, zip(*outputs)))
TypeError: expected sequence object with len >= 0 or a single integer
The text was updated successfully, but these errors were encountered: