cannot reshape array of size 3072 into shape (32,32)
时间: 2024-05-27 17:13:33 浏览: 206
mnist(linux环境下gunzip解压)
5星 · 资源好评率100%
This error occurs because you are trying to reshape an array of size 3072 into a shape of (32,32), which is not possible.
A possible reason for this error is that you are trying to reshape a flattened image array into its original shape of (32, 32), but the flattened array has more or fewer elements than expected.
To fix this error, you need to make sure that the size of the flattened array matches the expected size of the original image array. You can also check the shape of the array before reshaping it to ensure that it has the correct dimensions.
阅读全文