mmfewshot icon indicating copy to clipboard operation
mmfewshot copied to clipboard

'NoneType' object has no attribute 'update' when running Meta -RCNN

Open cmjkqyl opened this issue 1 year ago • 1 comments

2023-06-17 14:01:26,887 - mmfewshot - INFO - Hooks will be executed in the following order: before_run:


2023-06-17 14:01:26,888 - mmfewshot - INFO - workflow: [('train', 1)], max: 120000 iters 2023-06-17 14:01:26,888 - mmfewshot - INFO - Checkpoints will be saved to /home/qyl/QYL/mmfewshot/work_dirs/meta-rcnn_r50_c4_8xb4_coco_base-training by HardDiskBackend. Traceback (most recent call last): File "/home/qyl/QYL/mmfewshot/tools/detection/train.py", line 236, in main() File "/home/qyl/QYL/mmfewshot/tools/detection/train.py", line 225, in main train_detector( File "/home/qyl/QYL/mmfewshot/mmfewshot/detection/apis/train.py", line 206, in train_detector runner.run(data_loaders, cfg.workflow) File "/home/qyl/anaconda3/envs/mmfewshot/lib/python3.9/site-packages/mmcv/runner/iter_based_runner.py", line 144, in run iter_runner(iter_loaders[i], **kwargs) File "/home/qyl/anaconda3/envs/mmfewshot/lib/python3.9/site-packages/mmcv/runner/iter_based_runner.py", line 64, in train outputs = self.model.train_step(data_batch, self.optimizer, **kwargs) File "/home/qyl/anaconda3/envs/mmfewshot/lib/python3.9/site-packages/mmcv/parallel/data_parallel.py", line 77, in train_step return self.module.train_step(*inputs[0], **kwargs[0]) File "/home/qyl/QYL/mmfewshot/mmfewshot/detection/models/detectors/query_support_detector.py", line 207, in train_step losses = self(**data) File "/home/qyl/anaconda3/envs/mmfewshot/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl return forward_call(*input, **kwargs) File "/home/qyl/anaconda3/envs/mmfewshot/lib/python3.9/site-packages/mmcv/runner/fp16_utils.py", line 116, in new_func return old_func(*args, **kwargs) File "/home/qyl/QYL/mmfewshot/mmfewshot/detection/models/detectors/query_support_detector.py", line 169, in forward return self.forward_train(query_data, support_data, **kwargs) File "/home/qyl/QYL/mmfewshot/mmfewshot/detection/models/detectors/query_support_detector.py", line 299, in forward_train roi_losses = self.roi_head.forward_train( File "/home/qyl/QYL/mmfewshot/mmfewshot/detection/models/roi_heads/meta_rcnn_roi_head.py", line 91, in forward_train bbox_results = self._bbox_forward_train( File "/home/qyl/QYL/mmfewshot/mmfewshot/detection/models/roi_heads/meta_rcnn_roi_head.py", line 183, in _bbox_forward_train bbox_results.update(loss_bbox=loss_bbox) AttributeError: 'NoneType' object has no attribute 'update'

I am running Meta_RCNN-base. This error appears at the beginning of the training. I have not modified any model files. What is the reason for the error and the solution?

cmjkqyl avatar Jun 17 '23 06:06 cmjkqyl

我也遇到这个问题了,请问您解决了吗?

hui-yiming avatar Mar 13 '24 18:03 hui-yiming