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中只有两类,肯定没有写错
ValueError: Dimension 0 in both shapes must be equal
看到上面3、4两行都是被回车符占了,于是删除
ValueError: Dimension 0 in both shapes must be equal
结果真的能用了,很奇怪,之前好像这样没问题的呀,记不清了…反正能解决问题就行