You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am building a tensorflow model for regression with multi-inpout. the first input is a 50*3 sequence feature, and the other input is a float tensor. The base model:
input_seq = Input(shape=(50, 3)) # the first input
lstm1 = LSTM(64, return_sequences=True)(input_seq)
lstm2 = LSTM(32)(lstm1)
dense1 = Dense(32, activation='relu')(lstm2)
input_float = Input(shape=(1,)) # the second input
dense2 = Dense(16, activation='relu')(input_float)
concatenated = Concatenate()([dense1, dense2])
dense3 = Dense(8, activation='relu')(concatenated)
dense4 = Dense(1)(dense3)
model = Model(inputs=[input_seq, input_float], outputs=dense4)
The base model can be trained. But the model with Adapt can not be trained:
If I use '[ ]' to set the input: model_DA.fit([x_train,C_train], y_train, [x_test, C_train], batch_size=32, epochs=20)
AttributeError: 'list' object has no attribute 'shape'
Or if I use '( )' to set the input: model_DA.fit((x_train,C_train), y_train, (x_test, C_train), batch_size=32, epochs=20)
`ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 2 dimensions. The detected shape was (2, 148534) + inhomogeneous part.
Please let me know if this error is caused by the coding mistake.
The text was updated successfully, but these errors were encountered:
I am building a tensorflow model for regression with multi-inpout. the first input is a 50*3 sequence feature, and the other input is a float tensor. The base model:
The base model can be trained. But the model with Adapt can not be trained:
I tried to set encoder/task manually:
If I use '[ ]' to set the input:
model_DA.fit([x_train,C_train], y_train, [x_test, C_train], batch_size=32, epochs=20)
Or if I use '( )' to set the input:
model_DA.fit((x_train,C_train), y_train, (x_test, C_train), batch_size=32, epochs=20)
Please let me know if this error is caused by the coding mistake.
The text was updated successfully, but these errors were encountered: