How to use LSTM for time series data?
If you are going to use the ECG time series as the input for the LSTM-network you will need to reshape your data

data = data.reshape(signal length,time step pr sample, ECG channel)


So if your data is 36000 samples long and you only use 1 channel you will do like this:

data = data.reshape(36000,1,1)


Then you can make a simple LSTM model like this:

model = Sequential()
model.add(InputLayer(input_shape=(1, 1)))
model.add(LSTM(32,activation='tanh', return_sequences=True))
model.add(Dense(1, activation='sigmoid'))


I think the same principals will apply to your encoder/decoder