Error when checking model input: expected convolution2d_input_1 to have 4 dimensions, but got array with shape (32, 32, 3)

后端 未结 9 1686
南笙
南笙 2020-12-08 01:28

I want to train a deep network starting with the following layer:

model = Sequential()
model.add(Conv2D(32, 3, 3, input_shape=(32, 32, 3)))

9条回答
  •  猫巷女王i
    2020-12-08 02:32

    You should simply apply the following transformation to your input data array.

    input_data = input_data.reshape((-1, image_side1, image_side2, channels))
    

提交回复
热议问题