ValueError: Dimension 0 in both shapes must be equal

今天重新訓練yolo的時候出現了這個報錯

ValueError: Dimension 0 in both shapes must be equal, but are 1 and 21. Shapes are [1,1,1024,24] and [21,1024,1,1]. for ‘Assign_360’ (op: ‘Assign’) with input shapes: [1,1,1024,24], [21,1024,1,1].

一般情況就是class中的數量對不上

可是我class中只有兩類,肯定沒有寫錯
在這裏插入圖片描述
看到上面3、4兩行都是被回車符佔了,於是刪除
在這裏插入圖片描述
結果真的能用了,很奇怪,之前好像這樣沒問題的呀,記不清了…反正能解決問題就行

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章