Prooving a trained LSTM regression model
12 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hello
I am interested in proving how to derive the output given a new input value through the trained LSTM model.
I already know how to predict with new input data such as :
output = model.predict(input);
or
output = predict(model, input);
However, I am interested in a formula that uses the optimized variables of the trained LSTM (the variables shown in the figure below) to derive the results.
If you know what kind of calculation formula the output is derived when a new input value is given in LSTM, please help me.
0 Commenti
Risposta accettata
Ayush Aniket
il 8 Lug 2024
Hi James,
To find the output using the weights of your trained layers, you will have to implement the equations for all the layers in your model. For the LSTM layer, refer this document section which shows the equations used to compute the output for each time step:
You would have to repeat the process for all the Fully Connected layers as well keeping in mind the size of input for the respective layers. Refer the following documentation section which provides the respective formulae:
Note: You will also have to take care of the pre and post processing functions that MATLAB layers implicitly apply to better train the neural network. The following MATLAB answer can guide you: https://www.mathworks.com/matlabcentral/answers/2068661-using-the-trained-lstm-weight-parameters-in-matlab-the-results-obtained-by-calculating-with-a-formu
0 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Sequence and Numeric Feature Data Workflows in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!