version (2.67 KB) by Kohitij Kar
Function to get activations of a trained lstm layer for any given input


Updated 26 Oct 2017

View License

This function can be used to get the output of a trained lstm layer
that has been created using the builtin function 'lstmLayer'
output = getLSTMOutput(varargin)
output = getLSTMOutput('lstm_layer', lstm_layer, 'input', test_input);

'lstm_layer': Long Short-Term Memory (LSTM) layer created using the
function lstmLayer
'input': input to be tested (size should match that of the lstm layer
input [check: lstm_layer.InputSize]

'output': output of the lstm layer

$KK 10/20/2017
Feel free to the use the function for any purpose :)-
Also see 'lstmLayer' 'layers'

Cite As

Kohitij Kar (2022). getLSTMOutput (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2017b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!