Its major purpose is to retain information for a long period in an expressly specified memory cell. Unless the 'forget gate' tells the memory cell to forget the previous values, the previous values are preserved in the memory cell. The 'input gate' adds new information to the memory cell, which is then transmitted towards the next hidden unit from the cell all along vectors determined by the ‘output gate.’ Some of the uses of LSTMs include rudimentary music composition, Shakespearean poetry, and learning difficult sequences.