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
I meet same error
There is no --validate argument, only --no-validate.
I see the explanation. That means we can't train for several rounds and then Val?
------------------ 原始邮件 ------------------
发件人: "Kai Chen"<[email protected]>;
发送时间: 2020年5月29日(星期五) 中午1:12
收件人: "open-mmlab/mmdetection"<[email protected]>;
抄送: "利剑"<[email protected]>;"Author"<[email protected]>;
主题: 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 --no-validate argument. I am afraid the version you were using is too old.
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"<[email protected]>;
发送时间: 2020年5月29日(星期五) 中午1:18
收件人: "open-mmlab/mmdetection"<[email protected]>;
抄送: "利剑"<[email protected]>;"Author"<[email protected]>;
主题: 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
evaluation = dict(interval=1, metric='mAP')
optimizer = dict(type='SGD', lr=0.02, momentum=0.9, weight_decay=0.0001)
optimizer_config = dict(grad_clip=dict(max_norm=35, norm_type=2))
lr_config = dict(
policy='step',
warmup='linear',
Operation is just training, and there is no Val data calculation map? Please advise
Hi, I face this issue too. It is happening in gather_map() called in DataParallel. I have attached a screen shot of the debug window here:

Hi, I face this issue too. It is happening in gather_map() called in DataParallel. I have attached a screen shot of the debug window here:
Hi, I also face the "TypeError: expected sequence object with len >= 0 or a single integer" when one epoch is finished.
What caused this problem and could you please provide some advices about how to solve this problem?
Many thanks.
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"<[email protected]>; 发送时间: 2020年5月29日(星期五) 中午1:18 收件人: "open-mmlab/mmdetection"<[email protected]>; 抄送: "利剑"<[email protected]>;"Author"<[email protected]>; 主题: 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.
Hi, I also face the "TypeError: expected sequence object with len >= 0 or a single integer" when one epoch is finished.
Have you solved this problem?
What caused this problem and could you please provide some advices about how to solve this problem?
Many thanks.
Validation is enabled by default. If you want to skip the validation, you can add the
--no-validateargument. I am afraid the version you were using is too old.
Hi, the problem of "TypeError: expected sequence object with len >= 0 or a single integer" seems not relevant with the argument setting.
When one epoch is finished, and start do validation, the problem will arise.
Is it caused by the sample of validation number can not be divided with the (num_gpu * samples_per_gpu)?
Looking forward for your advises.
Validation is enabled by default. If you want to skip the validation, you can add the
--no-validateargument. I am afraid the version you were using is too old.Hi, the problem of "TypeError: expected sequence object with len >= 0 or a single integer" seems not relevant with the argument setting.
When one epoch is finished, and start do validation, the problem will arise.
Is it caused by the sample of validation number can not be divided with the (num_gpu * samples_per_gpu)?
Looking forward for your advises.
add the code
if isinstance(model, torch.nn.DataParallel):
model.device_ids = [0]
Validation is enabled by default. If you want to skip the validation, you can add the
--no-validateargument. I am afraid the version you were using is too old.Hi, the problem of "TypeError: expected sequence object with len >= 0 or a single integer" seems not relevant with the argument setting.
When one epoch is finished, and start do validation, the problem will arise.
Is it caused by the sample of validation number can not be divided with the (num_gpu * samples_per_gpu)?
Looking forward for your advises.
add the code
if isinstance(model, torch.nn.DataParallel):
model.device_ids = [0]
Validation is enabled by default. If you want to skip the validation, you can add the
--no-validateargument. I am afraid the version you were using is too old.Hi, the problem of "TypeError: expected sequence object with len >= 0 or a single integer" seems not relevant with the argument setting.
When one epoch is finished, and start do validation, the problem will arise.
Is it caused by the sample of validation number can not be divided with the (num_gpu * samples_per_gpu)?
Looking forward for your advises.add the code
if isinstance(model, torch.nn.DataParallel): model.device_ids = [0]
Hi, do you know why this error occured?
How these 2 lines can solve the error?
Thanks!
Validation is enabled by default. If you want to skip the validation, you can add the
--no-validateargument. I am afraid the version you were using is too old.Hi, the problem of "TypeError: expected sequence object with len >= 0 or a single integer" seems not relevant with the argument setting.
When one epoch is finished, and start do validation, the problem will arise.
Is it caused by the sample of validation number can not be divided with the (num_gpu * samples_per_gpu)?
Looking forward for your advises.add the code
if isinstance(model, torch.nn.DataParallel): model.device_ids = [0]Hi, do you know why this error occured?
How these 2 lines can solve the error?
Thanks!
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:
Traceback (most recent call last):
File "C:\Program Files\JetBrains\PyCharm 2020.2.1\plugins\python\helpers\pydev\pydevd.py", line 1448, in _exec
pydev_imports.execfile(file, globals, locals) # execute the script
File "C:\Program Files\JetBrains\PyCharm 2020.2.1\plugins\python\helpers\pydev\_pydev_imps\_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "C:/Users/Nafees Ahmed/PycharmProjects/pythonProject/DeepConvLSTM-master/DeepConvLSTM-master/DeepConvLSTM.py", line 14, in <module>
get_ipython().system('wget https://archive.ics.uci.edu/ml/machine-learning-databases/00226/OpportunityUCIDataset.zip')
AttributeError: 'NoneType' object has no attribute 'system'
I could not understand, why it happens and how can I solve it out? Please help me to sort out this problem
Validation is enabled by default. If you want to skip the validation, you can add the
--no-validateargument. I am afraid the version you were using is too old.Hi, the problem of "TypeError: expected sequence object with len >= 0 or a single integer" seems not relevant with the argument setting.
When one epoch is finished, and start do validation, the problem will arise.
Is it caused by the sample of validation number can not be divided with the (num_gpu * samples_per_gpu)?
Looking forward for your advises.add the code
if isinstance(model, torch.nn.DataParallel): model.device_ids = [0]below
That's not a good solution. You only train with nn.DataParallel but when you validate and test your model doesn't utilize nn.DataParallel and that may cause CUDA out of memory error when you try to test/validate with the same batch size of training.