expected dense_218_input to have 2 dimensions, but got array with shape (512, 28, 28, 1)

后端 未结 1 1335
無奈伤痛
無奈伤痛 2021-01-27 16:17

I am trying to augment my MNIST dataset in keras but for some reason its not working. Any help will be appreciated.

Part of the code:

x_train = x_train.r         


        
相关标签:
1条回答
  • 2021-01-27 16:44

    The dense_218_input should be a numpy 2d-array instead of shape: (512, 28, 28, 1). You can reshape it with numpy.reshape.

    0 讨论(0)
提交回复
热议问题