I am currently trying to implement a setup similar to this one in the keras docs. Meaning i have two inputs, one is a 1D convolutional layer - the other one is a single parameter - and a single output neuron.
My training data is defined as follows: x_train = [series, rsrp]
Where series is a (9000,4,5) numpy array and rsrp is also a np array with shape (9000,1).
When i try to optimize the model in hyperas i get the following error - even though it works just fine when i fit the model manually:
ValueError: Error when checking model input: the list of Numpy arrays that you are passing to your model is not the size the model exp
ected. Expected to see 2 array(s), but instead got the following list of 1 arrays
Also when I print the shape of x_train inside my create_model function I get the following output:
So it seems to me that the second array rsrp does not reach the create_model function.
Is this intented behaviour - because hyperas does not support functional layers - or is there a way to get this up and running?. Thank you very much!
Model setup:
TUPLE = (4,5)
series_input = Input(shape=TUPLE, name="SERIES")
rsrp_input = Input(shape=[1], name="RSRP")
a_conv = Conv1D(filters=128, kernel_size=2,input_shape=TUPLE)(series_input)
pool = MaxPooling1D(2)(a_conv)
flat = Flatten()(pool)
concat = concatenate([flat, rsrp_input])
x = Dense(64, activation='relu')(concat)
x = Dense(64, activation='relu')(x)
output = Dense(1, name='output')(x)
model = Model([series_input,rsrp_input], output)
model.compile(loss='mean_absolute_error', metrics=['mae'],optimizer='adam')
history = model.fit(x_train, y_train, epochs=50)
I am currently trying to implement a setup similar to this one in the keras docs. Meaning i have two inputs, one is a 1D convolutional layer - the other one is a single parameter - and a single output neuron.
My training data is defined as follows:
x_train = [series, rsrp]
Whereseries
is a(9000,4,5)
numpy array andrsrp
is also a np array with shape(9000,1)
. When i try to optimize the model in hyperas i get the following error - even though it works just fine when i fit the model manually:Also when I print the shape of
x_train
inside mycreate_model
function I get the following output:So it seems to me that the second array
rsrp
does not reach thecreate_model
function. Is this intented behaviour - because hyperas does not support functional layers - or is there a way to get this up and running?. Thank you very much!Model setup: