figure - detailed architecture of an lstm cell (sourcechristopher olah' blogcolah github iothe detailed architecture of an lstm cell is depicted in figure - the notation indicates one time stepc depicts the cell statesand indicates the hidden states the gates , help in removing or adding information to the cell state the gates if represent the inputoutput and forget gates respectively and each of them are modulated by the sigmoid layer which outputs numbers from to controlling how much of the output from these gates should pass thus this helps is protecting and controlling the cell state detailed work flow of how information flows through the lstm cell is depicted in figure - in four steps the first step talks about the forget gate layer fwhich helps us decide what information should we throw away from the cell state this is done by looking at the previous hidden state ht - and current inputs xt as depicted in the equation the sigmoid layer helps control how much of this should be kept or forgotten the second step depicts the input gate layer twhich helps decide what information will be stored in the current cell state the sigmoid layer in the input gate helps decide which values will be updated based on ht - xt again the tanh layer helps create vector of the new candidate values ct based on ht - xt which can be added to the current cell state thus the tanh layer creates the values and the input gate with sigmoid layer helps choose which values should be updated the third step involves updating the old cell state ct to the new cell state ct by leveraging what we obtained in the first two steps we multiply the old cell state by the forget gate ft ct - and then add the new candidate values scaled by the input gate with sigmoid layer it ct the fourth and final step helps us decide what should be the final output which is basically filtered version of our cell state the output gate with the sigmoid layer helps us select which parts of the cell state will pass to the final output this is multiplied with the cell state values when passed through the tanh layer to give us the final hidden state values ht ot tanh ct