I have got a X_train np.array with shape of (1433, 1). The first dimension (1433) is the number of images for training. The second dimension (1) is an np.array which itself has a shape (224, 224, 3). I could confirm it by X_train[0][0].shape. I need to fit X_train to the model:
model.fit([X_train, y_train[:,1:]], y_train[:,0], epochs=50, batch_size=32, verbose=1)
Error output is self-explanatory:
Traceback (most recent call last):
File "/home/combined/file_01.py", line 97, in <module>
img_output = Flatten()(x_1)
File "/usr/local/lib/python3.5/dist-packages/keras/engine/base_layer.py", line 414, in __call__
self.assert_input_compatibility(inputs)
File "/usr/local/lib/python3.5/dist-packages/keras/engine/base_layer.py", line 327, in assert_input_compatibility
str(K.ndim(x)))
ValueError: Input 0 is incompatible with layer flatten_1: expected min_ndim=3, found ndim=2
y_train[:,1:] seems to be OK with a shape (1433, 9).
What do I need to do with X_train in model.fit to successfully be able to input as (1433, 224, 224, 3)?