Sept. 14, 2023, 12:26 p.m. | Sujeeth Kumaravel

Towards AI - Medium pub.towardsai.net

PyTorch LSTMCell — Shapes of Input, Hidden State, Cell State And Output

In Pytorch, to use an LSTMCell (with nn.LSTMCell), we need to understand how the tensors representing the input time series, hidden state vector, and cell state vector should be shaped. In this article, let us assume you are working with multivariate time series. Each multivariate time series in the dataset contains multiple univariate time series.

In this article, we use the following terminology,

batch = number …

article hidden lstm machine learning neural-network-algorithm pytorch recurrent neural network series state time series vector

Founding AI Engineer, Agents

@ Occam AI | New York

AI Engineer Intern, Agents

@ Occam AI | US

AI Research Scientist

@ Vara | Berlin, Germany and Remote

Data Architect

@ University of Texas at Austin | Austin, TX

Data ETL Engineer

@ University of Texas at Austin | Austin, TX

Lead GNSS Data Scientist

@ Lurra Systems | Melbourne