ValueError: cannot reshape array of size 786432 into shape (256,256,3)

ValueError: cannot reshape array of size 786432 into shape (256,256,3)

用Keras实现unet多分类

测试批量图片的时候遇到的问题,输入图片为(512,512,3),而5125123=786432,就说明在reshape的时候没有把图片的长和宽减少一倍。修改代码之前:
ValueError: cannot reshape array of size 786432 into shape (256,256,3)_第1张图片
修改代码之后:
ValueError: cannot reshape array of size 786432 into shape (256,256,3)_第2张图片

你可能感兴趣的:(遇到的错误,python)