# Different Between LSTM and LSTMCell Function

**URL:** <https://discuss.pytorch.org/t/different-between-lstm-and-lstmcell-function/5657>\
**Category:** vision\
**Created:** [August 1, 2017, 5:37am UTC](https://discuss.pytorch.org/t/different-between-lstm-and-lstmcell-function/5657 "2017-08-01T05:37:22Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![moskomule](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/moskomule/32/4429_2.png) [@moskomule](https://discuss.pytorch.org/u/moskomule)\
**Post date:** [August 1, 2017, 6:30am UTC](https://discuss.pytorch.org/t/different-between-lstm-and-lstmcell-function/5657/2 "2017-08-01T06:30:08Z")

</div>

Hi. As far as I understand your figure, the red box below is the `Cell`.

![](https://discuss.pytorch.org/uploads/default/original/2X/f/fba1890185c48183e1cf8eb91086fc0f1b6df322.png)

That is the reason Cell return

> 

```
    h_1 (batch, hidden_size): tensor containing the next hidden state for each element in the batch
    c_1 (batch, hidden_size): tensor containing the next cell state for each element in the batch

```

---

_[View the full topic](https://discuss.pytorch.org/t/different-between-lstm-and-lstmcell-function/5657)._
