Closed hongu0603 closed 2 months ago
这个错应该报在加载位置了;;可以check下你加载的权重里的key
https://github.com/lyuwenyu/RT-DETR/blob/main/rtdetr_pytorch/tools/export_onnx.py#L23-L27
我是用以下指令訓練自己的資料集 然後我直接使用
python tools\export_onnx.py -c configs\rtdetr\rtdetr_r50vd_6x_coco.yml -r output\rtdetr_r50vd_6x_coco\eval\latest.pth --check
會顯示以下狀況 我在yaml_utils.py中新增 再跑一次則會出現 KeyError "model " ,checj 權重里的key也的確沒有model ,想請問會是訓練中的哪一個步驟有問題呢
eval/lastest.pth
不是模型 是评估结果; 使用和eval同一级目录的checkpoint-xxxx.pth
謝謝您! 解決了
使用export_onnx.py -c configs\rtdetr\rtdetr_r50vd_m_6x_coco.yml -r output\rtdetr_r50 vd_6x_coco\eval\latest.pth 要把pth 匯出時發生以下錯誤,想問是什麼原因