Error: ValueError: The last dimension of the inputs to `Dense` should be defined. Found `None`
You have None
in the length of the sequence in the second model.
i2 = Input(shape=(None, 104))
You can't flatten a variable length and have a known size.
You need a known size for Dense
.
Either you use a fixed length instead of None
, or you use a GlobalMaxPooling1D
or a GlobalAveragePooling1D
instead of Flatten
.