How to use multiple data in LSTM?
13 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
daemo Lee
el 12 de En. de 2022
Comentada: Pratyush Roy
el 19 de En. de 2022
In this example https://www.mathworks.com/help/deeplearning/ug/time-series-forecasting-using-deep-learning.html,
- Discription said that is 'For single time step predictions, use the CPU.' I wonder how to do multi time step pridiction in Matlab.
- Espacially, I would like to know about the way to use multi training data set for LSTM, not single training data set like this example.
That example used a double data(1xN), but I hope to enter multiple(M) double data(like MxN).
Please let me know some idea or give your knowledge.
0 comentarios
Respuesta aceptada
Pratyush Roy
el 17 de En. de 2022
Hi Daerno.
The example mentioned in the question is used for finding temporal relation between 1-D input and 1 dimensional output. As mentioned in the code:
numFeatures = 1;
numResponses = 1;
numHiddenUnits = 200;
layers = [ ...
sequenceInputLayer(numFeatures)
lstmLayer(numHiddenUnits)
fullyConnectedLayer(numResponses)
regressionLayer];
The number of features is 1. Hence the data passed as input is 1-dimensional in nature.
In general, LSTMs are built to work for multi-dimensional data. We can change the numFeatures and numResponses value to map one single/multi-dimensional vector to another single/multi-dimensional vector. This doc link captures a example involving multi-dimensional vectors.
Hope this helps!
2 comentarios
Pratyush Roy
el 19 de En. de 2022
Hi Daemo,
Since you have multiple datasets, you can train multiple LSTMs in parallel. Please refer to the doc link below for more details:
Hope this helps!
Más respuestas (0)
Ver también
Categorías
Más información sobre Sequence and Numeric Feature Data Workflows en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!