getLSTMOutput

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

268 Downloads

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'
USAGE:
output = getLSTMOutput(varargin)
output = getLSTMOutput('lstm_layer', lstm_layer, 'input', test_input);

INPUTS:
'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': 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 (https://www.mathworks.com/matlabcentral/fileexchange/64863-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!