In LSTM, what's the difference between predict() and predictAndUpdateState()?

6 Ansichten (letzte 30 Tage)
huilin hu
huilin hu am 19 Apr. 2020
Beantwortet: Sabin am 7 Mär. 2023
In my work, I need to train a net and predict the next one data(as YPred(1)). Then I use the next true data(as XTrain+1 and YTrain+1) to correct the net and predict the new next one data(YPred(2)), and so on...
1)so, do i have to train the net with XTrain and YTrain adding the new true data everytime?
2)what's the diference between predict() and predictAndUpdateState()?
I want something like:
for i = 2:numTest
[net,YPred(:,i)] = predictAndUpdateState(net,XTest(:,i-1),YTest(:,i-1),'ExecutionEnvironment','cpu');
end
3)what's the use of resetState()?
net = resetState(net);
net = predictAndUpdateState(net,XTrain);
https://ww2.mathworks.cn/help/deeplearning/examples/time-series-forecasting-using-deep-learning.html

Antworten (1)

Sabin
Sabin am 7 Mär. 2023
predict
Predict responses using trained deep learning neural network
predictAndUpdateState
Predict responses using a trained recurrent neural network and update the network state
resetState
Reset state parameters of neural network
Deep Learning Tips and Tricks

Kategorien

Mehr zu Sequence and Numeric Feature Data Workflows finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by