Training an LSTM-based neural network
While neural networks are wonderfully flexible in regards to input data shapes and levels of cleanliness, they do require quite a bit more configuration than other model options before we even talk about model training. The first thing we’ll do is define our network architecture:
Figure 10.10 – LSTM model network architecture
The LSTM unit itself is a very powerful predictive tool. In many use cases, you may find LSTM units stacked on top of each other, running in parallel, or supplemented with additional dense layers to generate the desired output shape. Check out the book Codeless Deep Learning from Packt for more on LSTM networks.
In this example, we will consider a very simple architecture:
- The first node in the preceding diagram adds an input layer whose shape matches that of our chosen input tensor – that is, a 200-unit one-dimensional vector representing our past 200 lagged temperature...