Is it possible to use a three-dimensional matrix to train LSTM network in Matlab R2020b?
조회 수: 2 (최근 30일)
이전 댓글 표시
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
Aditya Patil
2021년 4월 6일
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
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Sequence and Numeric Feature Data Workflows에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!