yolov8问题

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值