Validaiton| TypeError: 'DataContainer' object is not subscriptable #14
Description
Encounter this error when procssessing validation
[ ] 0/4952, elapsed: 0s, ETA:Traceback (most recent call last):
File "./tools/train.py", line 267, in
main()
File "./tools/train.py", line 242, in main
distributed=distributed, validate=args.no_validate, timestamp=timestamp, meta=meta)
File "/home/bdggj/MI-AOD/mmdet/apis/train.py", line 120, in train_detector
runner.run(data_loaders_L, cfg.workflow, cfg.total_epochs)
File "/home/bdggj/anaconda3/envs/miaod/lib/python3.7/site-packages/mmcv/runner/epoch_based_runner.py", line 161, in run
epoch_runner(data_loaders[i], **kwargs)
File "/home/bdggj/anaconda3/envs/miaod/lib/python3.7/site-packages/mmcv/runner/epoch_based_runner.py", line 43, in train
self.call_hook('after_train_epoch')
File "/home/bdggj/anaconda3/envs/miaod/lib/python3.7/site-packages/mmcv/runner/base_runner.py", line 298, in call_hook
getattr(hook, fn_name)(self)
File "/home/bdggj/MI-AOD/mmdet/core/evaluation/eval_hooks.py", line 71, in after_train_epoch
gpu_collect=self.gpu_collect)
File "/home/bdggj/MI-AOD/mmdet/apis/test.py", line 85, in multi_gpu_test
y_head = model(return_loss=False, rescale=True, **data)
File "/home/bdggj/anaconda3/envs/miaod/lib/python3.7/site-packages/torch/nn/modules/module.py", line 889, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/bdggj/anaconda3/envs/miaod/lib/python3.7/site-packages/torch/nn/parallel/distributed.py", line 705, in forward
output = self.module(*inputs[0], **kwargs[0])
File "/home/bdggj/anaconda3/envs/miaod/lib/python3.7/site-packages/torch/nn/modules/module.py", line 889, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/bdggj/MI-AOD/mmdet/core/fp16/decorators.py", line 51, in new_func
return old_func(*args, **kwargs)
File "/home/bdggj/MI-AOD/mmdet/models/detectors/base.py", line 164, in forward
return self.forward_test(x, img_metas, return_box=return_box, **kwargs)
File "/home/bdggj/MI-AOD/mmdet/models/detectors/base.py", line 144, in forward_test
return self.simple_test(imgs[0], img_metas[0], return_box=return_box, **kwargs)
File "/home/bdggj/MI-AOD/mmdet/models/detectors/single_stage.py", line 109, in simple_test
y_head_loc_cls = self.bbox_head.get_bboxes(*outs, img_metas, rescale=rescale)
File "/home/bdggj/MI-AOD/mmdet/core/fp16/decorators.py", line 131, in new_func
return old_func(*args, **kwargs)
File "/home/bdggj/MI-AOD/mmdet/models/dense_heads/MIAOD_head.py", line 641, in get_bboxes
img_shape = img_metas[img_id]['img_shape']
TypeError: 'DataContainer' object is not subscriptable
Traceback (most recent call last):
File "/home/bdggj/anaconda3/envs/miaod/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/home/bdggj/anaconda3/envs/miaod/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/bdggj/anaconda3/envs/miaod/lib/python3.7/site-packages/torch/distributed/launch.py", line 340, in
main()
File "/home/bdggj/anaconda3/envs/miaod/lib/python3.7/site-packages/torch/distributed/launch.py", line 326, in main
sigkill_handler(signal.SIGTERM, None) # not coming back
File "/home/bdggj/anaconda3/envs/miaod/lib/python3.7/site-packages/torch/distributed/launch.py", line 301, in sigkill_handler
raise subprocess.CalledProcessError(returncode=last_return_code, cmd=cmd)
subprocess.CalledProcessError: Command '['/home/bdggj/anaconda3/envs/miaod/bin/python', '-u', './tools/train.py', '--local_rank=0', 'configs/MIAOD.py', '--launcher', 'pytorch']' returned non-zero exit status 1.
Killing subprocess 30225