I have this neural network model to create anomaly detection model. I copy this model from one of a tutorial website
def autoencoder_model(X):
inputs = Input(shape=(X.shape[1], X.shape[2]))
L1 = LSTM(16, activation='relu', return_sequences=True, kernel_regularizer = regularizers.l2(0.00))(inputs)
L2 = LSTM(4, activation = 'relu', return_sequences=False)(L1)
L3 = RepeatVector(X.shape[1])(L2)
L4 = LSTM(4, activation='relu', return_sequences=True)(L3)
L5 = LSTM(16, activation = 'relu', return_sequences=True)(L4)
output = TimeDistributed(Dense(X.shape[2]))(L5)
model = Model(inputs=inputs, outputs=output)
return model
I know that 16 or 4 is number of perceptron. but I don't know the return_sequences means and why L2 and L3 have to be False. And I don't know what kernel_regularizer means. I already read the documentation but still I don't understand