Is it possible to use a three-dimensional matrix to train LSTM network in Matlab R2020b?
9 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hello everyone,
Previously I trained the neural networks with the trainNetwork(XTrain0',YTrain',layers0,options), with XTrain0 as the input variables, expressed as a (7670 x 7) array, and the YTrain as the output variable that I would like to predict in the future, expressed as a (7670 x 1) array. The result looks good..
However, I currently have difficulty on training the LSTM network with 3-dimensional input data. I want to determine the details fo the original input data variable by breaking them into 139 segments. Originally I tried to use (1058460 x 7) array and (1058460 x 1) array as inputs, but the result of prediction was highly inaccurate.
and I tried to test whether I can do it by creating 3-dimensional variables: the input ends up looking like (7670 x 7 x 139) array and the input is (7670 x 1 x 139) array, but I have difficulty on rewriting the network (layers0). Here is my original modified version of layers0:
layers0 = [ ...
sequenceInputLayer([7,139,1])
lstmLayer(100,'OutputMode','sequence')
fullyConnectedLayer(1)
dropoutLayer(0.4)
regressionLayer];
I tried to look up every page of MATLAB but cannot find the solution. Please help me improve my layers0 so that I can input my 3-dimensional variables. Thank you.
3 commentaires
Aditya Patil
le 6 Avr 2021
Here is an example for 3D input, https://www.mathworks.com/help/deeplearning/ref/nnet.cnn.layer.sequenceinputlayer.html#mw_d1a76588-f98f-4d19-9130-d4411b4a5ee9
Réponses (0)
Voir également
Catégories
En savoir plus sur Sequence and Numeric Feature Data Workflows dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!