ValueError: Error when checking input: expected conv2d_1_input to have shape (28, 28, 1) but got arr

imgs = imgs.reshape([-1,28,28,1])

数据的shape改成这样就可以了,数据集用的fashion mnist

 

ValueError: Error when checking input: expected conv2d_1_input to have 4 dimensions, but got array with shape - lypbendlf - 博客园

你可能感兴趣的:(Python,报错)