Overview
Code
let output_neurons = 20;
let numberOfLayers = 2;
let lstm_cells = [];
for (let index = 0; index < numberOfLayers; index++) {
lstm_cells.push(tf.layers.lstmCell({units: output_neurons}));
}
//add the lstm cells
model.add(tf.layers.rnn({cell: lstm_cells,
inputShape: input_shape, returnSequences: false}));