Traceback (most recent call last):
File "/home/lsw/LSW/hl/mi1/cal_map.py", line 333, in <module>
predict_json(image_root,val_cls,model, thr)# val_cls
File "/home/lsw/LSW/hl/mi1/cal_map.py", line 230, in predict_json
result = inference_detector(model, os.path.join(images_root, image_path))
File "/home/lsw/miniconda3/envs/mi/lib/python3.8/site-packages/mmdet/apis/inference.py", line 191, in inference_detector
data_samples = model.test_step(data_)
File "/home/lsw/miniconda3/envs/mi/lib/python3.8/site-packages/mmengine/model/base_model/base_model.py", line 145, in test_step
return self._run_forward(data, mode='predict') # type: ignore
File "/home/lsw/miniconda3/envs/mi/lib/python3.8/site-packages/mmengine/model/base_model/base_model.py", line 340, in _run_forward
results = self(**data, mode=mode)
File "/home/lsw/miniconda3/envs/mi/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "/home/lsw/miniconda3/envs/mi/lib/python3.8/site-packages/mmdet/models/detectors/base.py", line 94, in forward
return self.predict(inputs, data_samples)
File "/home/lsw/miniconda3/envs/mi/lib/python3.8/site-packages/mmdet/models/detectors/single_stage.py", line 87, in predict
results_list_cls,results_list_state = self.bbox_head.predict(
File "/home/lsw/miniconda3/envs/mi/lib/python3.8/site-packages/mmdet/models/dense_heads/base_dense_head.py", line 197, in predict
predictions = self.predict_by_feat(
File "/home/lsw/LSW/hl/mi1/mmyolo/models/dense_heads/yolov5_head.py", line 492, in predict_by_feat
flattened_A = TensorA.view(TensorA.shape[0], -1)
RuntimeError: cannot reshape tensor of 0 elements into shape [0, -1] because the unspecified dimension size -1 can be any value and is ambiguous
08-06
6484
04-26
1707
04-06
8787
04-02
2864
10-11