I am building a Keras model that has multiple inputs with different shapes.
input_img = Input(shape=(728,))
input_1 = Input(shape=(1,))
input_2 = Input(shape=(1,))
x = (Dense(48,kernel_initializer='normal',activation="relu"))(input_img)
x = (Dropout(0.2))(x)
x = (Dense(24,activation="tanh"))(x)
x = (Dropout(0.3))(x)
x = (Dense(1))(x)
x = keras.layers.concatenate([x, input_1, input_2])
x = (Activation("sigmoid"))(x)
cnn = Model(inputs = [input_img, input_1, input_2], outputs = x)
cnn.compile(loss="binary_crossentropy", optimizer='adam')
I tried to define the input as
inputs = (X_train.reshape(10000,728), input_1[0:10000], input_2[0:10000])
And when I try to train, I get the error
AttributeError: 'tuple' object has no attribute 'ndim'
I attempted to turn inputs into a numpy array, however, I get another error
ValueError: could not broadcast input array from shape (10000,728) into shape (10000)
How can I train this model with multiple inputs if they have different shapes? It seems like everything I tried has lead to some type of error.