ValueError: Dimension 0 in both shapes must be equal

我就是我 2023-02-11 03:28 84阅读 0赞

今天重新训练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两行都是被回车符占了,于是删除
在这里插入图片描述
结果真的能用了,很奇怪,之前好像这样没问题的呀,记不清了…反正能解决问题就行

发表评论

表情:
评论列表 (有 0 条评论,84人围观)

还没有评论,来说两句吧...

相关阅读