I know there are a lot of questions to this topic, but I don't understand why in my case both options are possible. My input shape in the LSTM is (10,24,2) and my hidden_size is 8.
model = Sequential()
model.add(LSTM(hidden_size, return_sequences=True, stateful = True,
batch_input_shape=((10, 24, 2))))
model.add(Dropout(0.1))
Why is it possible to either add this line below:
model.add(TimeDistributed(Dense(2))) # Option 1
or this one:
model.add(Dense(2)) # Option 2
Shouldn't Option 2
lead to a compilation error, because it expects a two-dimensional input?