我有一个35000张256x256灰度图像的阵列
print(len(data))
>>>35000
print(data[0].shape)
>>>(256, 256)
我的第一层是
model.add(Conv2D(64, (3, 3), input_shape=(35000,), activation='relu'))
,它给了我错误
>>>ValueError: Input 0 is incompatible with layer conv2d_1: expected ndim=4, found ndim=2
我在做错什么?定义输入形状的正确方法是什么?
卷积层输入形状: (images, height, width, channels)
so:
- input_shape =(256,256,1)
- batch_shape =(batch_size,256,256,1)
- batch_input_shape =(batch_size,256,256,1)