ValueError: could not broadcast input array from shape (201,201,3) into shape (201,201)
ValueError: could not broadcast input array from shape (201,201,3) into shape (201,201)test_data = np.array(test_data)#错误语句,原因是test_data中的图片维度不同,2维和3维混杂#我的解决方法是在读取原图的语句后面添加 mode=“RGB”#一般用opencv读取的图片都是mode="RGB",在读取过程中将模式统一具体问题具体分析,本人用这种方法解决该问题。报错的本质:
原创
2021-03-11 15:12:18 ·
2609 阅读 ·
2 评论