I was following some examples to get familiar with TensorFlow's LSTM API, but noticed that all LSTM initialization functions require only the num_units parameter, which denotes the number of hidden units in a cell.
According to what I have learned from the famous colah's blog, the cell state has nothing to do with the hidden layer, thus they could be represented in different dimensions (I think), and then we should pass at least 2 parameters denoting both #hidden and #cell_state.
So, this confuses me a lot when trying to figure out what the TensorFlow's cells do. Under the hood, are they implemented like this just for the sake of convenience or did I misunderstand something in the blog mentioned?


unitsparameter represent both the cell size and the output size – Alberto Jul 27 '22 at 23:46unitsparameter represents both is because the output is just the hidden state. The idea of this is that if you don't want the hidden state to be this size, you can just add a linear layer on top of it and transform it how you see fit, which is what defining the output size would do anyway – Recessive Jul 28 '22 at 02:01